*

webcity

  • ****
  • 243 posts
Zip code not correct in edit item
« on: June 20, 2022, 04:40:37 PM »
Hi,

When a customer post an advert without posting a Zip Code. When I go to edit the advert it shows a Zip code from another advert.

Can anyone suggest a solution?

Many thanks

*

MB Themes

Re: Zip code not correct in edit item
« Reply #1 on: June 30, 2022, 10:02:11 AM »
@webcity
I was not able to reproduce on demo, but try to update item-post.php with this code.

Find:
Code: [Select]
$prepare['i_category'] = eps_get_session('catId') <> '' ? eps_get_session('catId') : osc_item_category_id();
Bellow this line, add following:
Code: [Select]
$prepare['s_zip'] = eps_get_session('sZip') <> '' ? eps_get_session('sZip') : osc_item_zip();
$prepare['s_address'] = eps_get_session('sAddress') <> '' ? eps_get_session('sAddress') : osc_item_address();
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: Zip code not correct in edit item
« Reply #2 on: September 21, 2022, 09:25:42 AM »
Hi,

There is some Problem in Item Sold (Item Edit). If customer clicked Item Sold in Item edit then he can not uncheck that option. while I have checked from backend - if i clicked on Item Sold then i can not uncheck that option. its permanently shows item sold.

please tell me how to fix this issue.

Thanks in Advance.

*

MB Themes

Re: Zip code not correct in edit item
« Reply #3 on: September 21, 2022, 03:07:26 PM »
It should be oossible to uncheck from user items section
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

Re: Zip code not correct in edit item
« Reply #4 on: September 25, 2022, 11:51:01 AM »
Sorry for late reply. But i already said from both end (admin and user) not able to do that. If uncheck that option "item sold" during editing the product it's remain checked. If we edit again it's still Marked that option "item sold"

*

mwindey

  • *****
  • 478 posts
Re: Zip code not correct in edit item
« Reply #5 on: September 25, 2022, 01:06:03 PM »
@Sanjay Srivastava

During tests i noticed that when memcache is enabled it takes 1 min before the link is marked as sold/unsold. If i disable memcache in config.php it works without delay.
Activating memcache again the delay (1min) returns.

Re: Zip code not correct in edit item
« Reply #6 on: September 25, 2022, 02:04:50 PM »
But its not time issue because if i uncheck the product after 2 weeks, or month its still not being uncheck. and i have checked in my config.php there is no memcache. i have not installed memcache.

I think some issue here - As i dont know about coding.. but i think some problem here functions.php . tell me if i am wrong

echo '<div class="control-group">';
      echo '<label class="control-label" for="sSold">' . __('Item Sold', 'delta') . '</label>';
      echo '<div class="controls"><input type="checkbox" name="sSold" id="sSold" ' . ($item_extra['i_sold'] == 1 ? 'checked' : '') . ' /></div>';
      echo '</div>';

or here

// CHECK IF ITEM MARKED AS SOLD-UNSOLD
function del_check_sold(){
  $conn = DBConnectionClass::newInstance();
  $data = $conn->getOsclassDb();
  $comm = new DBCommandClass($data);

  $status = Params::getParam('markSold');
  $id = Params::getParam('itemId');
  $secret = Params::getParam('secret');
  $item_type = Params::getParam('itemType');

  if($status <> '' && $id <> '' && $id > 0) {
    $item = Item::newInstance()->findByPrimaryKey($id);

    if( $secret == $item['s_secret'] ) {
      //Item::newInstance()->dao->update(DB_TABLE_PREFIX.'t_item_delta', array('i_sold' => $status), array('fk_i_item_id' => $item['pk_i_id']));
      $comm->update(DB_TABLE_PREFIX.'t_item_delta', array('i_sold' => $status), array('fk_i_item_id' => $item['pk_i_id']));
 
      if (osc_rewrite_enabled()) {
        $item_type_url = '?itemType=' . $item_type;
      } else {
        $item_type_url = '&itemType=' . $item_type;
      }

      header('Location: ' . osc_user_list_items_url() . $item_type_url);
    }
  }
}

osc_add_hook('header', 'del_check_sold');
« Last Edit: September 25, 2022, 02:32:42 PM by Sanjay Srivastava »

*

mwindey

  • *****
  • 478 posts
Re: Zip code not correct in edit item
« Reply #7 on: September 25, 2022, 04:27:02 PM »
@ Sanjay Srivastava

The problem is not in theme files because i also experience the same issue when changing to Veronika theme which uses different theme files incl. functions file.
On test site memcache is also disabled and since then there is no problem to mark sold/unsold and in admin it is possible again to move categories which wasn't possible anymore (reason unknown)

It is not browser issue because it was tested in chrome/firefox/edge and mobile

Note: Testing on demo site https://osclasspoint.com/osclass-themes/general/epsilon-osclass-theme-i194
I created a listing and tried to mark as sold which gave me the same 1min delay results...So it is either our system or ???

Now off the record: i woke up from my dream  ::)  and noticed that topic is not in the right place anymore since this is a complete other discussion then zip code issues.... :) :D :D :D
« Last Edit: September 25, 2022, 05:30:30 PM by mwindey »

Re: Zip code not correct in edit item
« Reply #8 on: September 26, 2022, 08:39:34 PM »
Still not getting right solution for this

Re: Zip code not correct in edit item
« Reply #9 on: September 27, 2022, 08:08:52 AM »
It should be oossible to uncheck from user items section

I am waiting for reply.. I know you can fix this issue.. you have great knowledge. thanks in advance.

*

mwindey

  • *****
  • 478 posts
Re: Zip code not correct in edit item
« Reply #10 on: September 27, 2022, 12:05:47 PM »
@Sanjay Srivastava

Are you sure that in config.php you have this part disabled?


// MemCache caching option (database queries cache)
// define('OSC_CACHE', 'memcache');
// $_cache_config[] = array('default_host' => 'localhost', 'default_port' => 11211, 'default_weight' => 1);

*

MB Themes

Re: Zip code not correct in edit item
« Reply #11 on: September 27, 2022, 01:18:32 PM »
@mwindey
For me it looks only session issue could be there
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

mwindey

  • *****
  • 478 posts
Re: Zip code not correct in edit item
« Reply #12 on: September 27, 2022, 01:43:33 PM »
@MB Themes

Could be anything  :D But when i try on a new install (subdomain) only osclass 8.02 and epsilon without any plugin and with the use of memcached i am not able to mark item as sold unless i click it min.20 times.
Also demo when creating a new listing demo site https://osclasspoint.com/osclass-themes/general/epsilon-osclass-theme-i194 the same issue with mobile data and home computers. Different browsers etc....
Have you tried on demo? And does it work for you?



« Last Edit: September 27, 2022, 02:04:50 PM by mwindey »

Re: Zip code not correct in edit item
« Reply #13 on: September 28, 2022, 07:02:56 AM »
Thanks for Replies.. But as i already said i have not installed memcache in my server or its not installed. because no memcache available in config.php .



and Yes I have checked in Localhost same issue.

and this is not session issue. because if i picked up any old product which is marked sold out before 10-15 days or more . then same problem.

I able to edit product and also i able to check and uncheck that option (Item Sold)  but once its clicked for item sold then after editing you can not republish.

Because if i or customer edit that product and uncheck that option and save product but its still shows item sold. and if you edit again that product its still showing checked . while i have tried to save more than 5 times but still same issue.   
« Last Edit: September 28, 2022, 07:06:16 AM by Sanjay Srivastava »

*

MB Themes

Re: Zip code not correct in edit item
« Reply #14 on: September 28, 2022, 09:10:28 AM »
@Sanjay
I've been checking now from backoffice and everything works as expected, but as memcache is enabled on demo, I got delay by updating flag.
Anyway I was still able to update listing from back & front office and mark or unmark it.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots