Sort by Price for Variants - Error 1054

  • Posts: 429
  • Thank you received: 19
6 years 10 months ago #287465

Hi. I'm very glad you added this feature, but there's a problem sorting out variants by price. Displays the following error: Error: 1054 Unknown column 'c.product_sort_price' in 'order clause'.

Last edit: 6 years 10 months ago by neo191987.

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

  • Posts: 12953
  • Thank you received: 1778
6 years 10 months ago #287469

Hello,

Can you us the "Check database" button via "Hikashop->System->Configuration" and test it again ?

Thank you.

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

  • Posts: 429
  • Thank you received: 19
6 years 10 months ago #287516

Hi, unfortunately without success.

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

  • Posts: 83025
  • Thank you received: 13404
  • MODERATOR
6 years 10 months ago #287524

Hi,

Please edit the file /libraries/joomla/database/exception/executing.php
and change the line:
parent::__construct($message, $code, $previous);
by:
parent::__construct($message.' '.$query, $code, $previous);
in order to get the full MySQL query so that we have a better understanding of the situation.

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

  • Posts: 429
  • Thank you received: 19
6 years 10 months ago #287582

Unknown column 'c.product_sort_price' in 'order clause' SELECT v.*, c.* FROM adl_hikashop_variant AS v INNER JOIN adl_hikashop_characteristic AS c ON v.variant_characteristic_id = c.characteristic_id WHERE v.variant_product_id IN (1,2) ORDER BY v.ordering ASC, c.product_sort_price ASC

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

  • Posts: 83025
  • Thank you received: 13404
  • MODERATOR
6 years 10 months ago #287585

Hi,

Remove the code:

		} elseif($sort == 'price') {
			$order = 'product_sort_price ASC';
in components/com_hikashop/views/product/view.html.php and that should fix the issue.

The following user(s) said Thank You: neo191987

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

Time to create page: 0.072 seconds
Powered by Kunena Forum