Problem with pagination when managing serials in fron end

  • Posts: 128
  • Thank you received: 2
7 years 9 months ago #260495

-- HikaShop version -- : 2.6.4
-- HikaSerial version -- : 1.10.4
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.6

Hi,

I'm using HikaMarket multi-vendor together with Hikaserial and I have found a problem when a vendor is managing his serials from the front end.

The problem occurs when clicking a product stats icon in the serialsmarket/packs view (the front end packs view) to navigate from this view into the serialsmarket/stats view (the front end view that shows the serial numbers for a particular product).

The problem starts to happen when there is pagination in the packs view and you go into the second page. For pagination to happen thre needs to be over 20 products linked with different packs. Once you into the second page, every time I click the stats icon to navigate from the packs view into the stats view I get the following SQL error:

Unknown column 'pack.pack_id' in 'order clause' SQL=SELECT serial.*, hk_order.order_id FROM #__hikaserial_serial AS serial INNER JOIN #__hikashop_order AS hk_order ON serial.serial_order_id = hk_order.order_parent_id INNER JOIN #__hikashop_order_product AS hk_order_product ON hk_order_product.order_product_id = serial.serial_order_product_id WHERE (serial.serial_pack_id = 9) AND (hk_order.order_type = 'subsale') AND (hk_order.order_vendor_id = 4) AND (hk_order_product.product_id = 30) ORDER BY pack.pack_id ASC

In fact, the problem starts to occur as soon as you touch the pagination buttons at the bottom of the packs view. Si, if instead of going to the second page you select "list all" to see all the packs in the first page, from that moment you start seeing the SQL error as well.

If you log out and then log back in everything works fine again until you touch again the pagination buttons in the packs view.

I hope you can find where the problem is, thanks!

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 9 months ago #260520

Hi,

It looks like you have something in your session which is messing up with the wrong listing.
The best for you would be to replace in the serialmarket/view.html.php file

$query = 'FROM '.hikaserial::table($cfg['table']).' AS serial '.$join.$filters.$order;
By
$query = 'FROM '.hikaserial::table($cfg['table']).' AS serial '.$join.$filters.' ORDER BY serial.serial_id';
I really don't know how such invalid data is added in your user session but you have an order for a listing which is affecting that specific listing.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 128
  • Thank you received: 2
7 years 9 months ago #260576

Thank you, that fixes the problem.

Since this is a core hack I assume it will be added to the next versions of Hikaserial, right?

Please Log in or Create an account to join the conversation.

  • Posts: 26156
  • Thank you received: 4028
  • MODERATOR
7 years 9 months ago #260581

Right :)


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: sabroso

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.062 seconds
Powered by Kunena Forum