Procuct List from lowest to highest

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #231372

-- url of the page with the problem -- : www.polaris-ranger-razor-atv.it/home/dis...ry/48-rzr-razor.html
-- HikaShop version -- : last
-- Joomla version -- : 3.4.8

Hi, i want display the product from lowest to highest...

i can do?

Thank you in advamce for your anwser

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

  • Posts: 12953
  • Thank you received: 1778
9 years 5 months ago #231376

Hello,
Sure, you'll just have to set the "Ordering" option of your product listing content menu/module to product_sort_price so that it can sort your products by their price.

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

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #231428

Hi, Thank you for your answer :)
but i don't see the option product_sort_price you can click on the these link for
example image

maybe, looking for in the wrong place?

Cheers
Marco

Last edit: 9 years 5 months ago by marcoboni.

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

  • Posts: 84233
  • Thank you received: 13675
  • MODERATOR
9 years 5 months ago #231460

Hi,

What Mohamed is proposing is not yet available in the current release of HikaShop.

For now you need to do like that:
- Create a custom field of the table "product" via the menu Display>Custom fields to store the prices for the sorting
- In your products listing menu/module use that custom field column name for the "ordering column"
- Create a mass action via the menu System>Mass actions with an action "update the values" on your custom field with the value price.price_value
When you run the mass action, it will copy the prices you set in your products in the custom field so that they can be used for the sorting on the listing. And you can add a trigger on the mass action so that it is run each time after a product is updated so that the ordering is maintained in the future when you modify the prices of the products in the backend.

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

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #231584

Hi Nicolas, Thank you!

...But i don't undestand the step of the mass action, i created the my field price_list but afther the mass action the fields are empty.

i attached the image about setting my mass action where the field price_list is my costum field

Cheers
Marco

Last edit: 9 years 5 months ago by marcoboni.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #231594

Hi,

You have to set it like that: take.ms/St7P1

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

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #231750

Hi Xavier, thank you !

I set it and there is a small improvement, but comeback a error:

1054 Unknown column 'hk_price.price_list' in 'field list' SQL=UPDATE #_hikashop_product AS hk_product LEFT JOIN #_hikashop_price AS hk_price ON hk_price.price_product_id = hk_product.product_id SET hk_price.price_list = 0 WHERE hk_product.product_id IN

the suffix hk on my database is worng, but instead the tables i wrote in red are correct. ( the # is not real suffix i don't write the real suffix for security)

Thanks in advance for your help

Last edit: 9 years 5 months ago by marcoboni.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #231752

Hi,

My bad, the type of the value must be "operation" and not "int".

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

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #231860

Hi,
i changed the type of the value but comeback the same error :huh:

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #231870

Hi,

Please give us a screenshot of how you set your mass action and another one for the way you set the custom field.
It seems that there is an issue on the column selected for the mass action and the one used for the custom field.

What is your HikaShop version ? (with numbers).

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

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #232001

Hi,
well, i created my costum field in the product table :
Hika shop --> 2.6.1
Name my costum field--> price_list
tha image of the set --> click here

but i have a question, it's correct the suffix hk_price.price_list ? because my table have another suffix not hk

Thank you soo much for your help!

Last edit: 9 years 5 months ago by marcoboni.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #232009

Hi,

There was indeed an issue, please edit the file "administrator/components/com_hikashop/classes/massaction.php" and replace the line:

$queryTables[] = 'hk_'.$string;
By:
$queryTables[] = 'hk_'.$string['table'];

Thank you for this report.

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

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #232026

ok! same thing is changed, but comeback another error number 1066

Not unique table/alias: 'hk_price' SQL=UPDATE orv_hikashop_product AS hk_product LEFT JOIN orv_hikashop_price AS hk_price ON hk_price.price_product_id = hk_product.product_id LEFT JOIN orv_hikashop_price AS hk_price ON hk_price.price_product_id = hk_product.product_id SET hk_price.price_list = hk_price.price_value WHERE hk_product.product_id IN (3,4,5,7,8,9,10,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,12,33,34,36,37,38,40,41,43,44,45,46,47,35,39,42,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,93,94,96,98,99,100,101,102,103,104,105,107,108,109,111,112,113,114,115,116,117,118,119,120,121,122,123,124)

for your information i replace the line 1799 on the file massaction.php

Last edit: 9 years 5 months ago by marcoboni.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #232028

Hi,

Please provide a backend and FTP access via our contact form with a link to this topic in the url.
www.hikashop.com/support/contact-us.html

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #232112

Hi,

I am not able to reach your backend but I added a patch on your website, that should fix the issue.
Please confirm that this is indeed the case :)

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

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #232138

I test it but don't work again :)
I send you a private message on the forum whit joomla credential.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #232156

I have the credentials but when I try to login I get an error.
Connexion reset, load error.

Do you have any IP restrictions ?

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

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #232198

who was there to set up a server-side protection ... I did not know :huh:
Now I disabled the protection and you can access whit this address:
polaris-ranger-razor-atv.it/administrator use the https


I'm sorry you can try right now, thanks

Last edit: 9 years 5 months ago by marcoboni.

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #232309

Hi,

I just understood the issue, it is due to the name of your custom field.
As the name starts with "price_" the system thinks that it is a price column.

Please do the same operation but on a custom product field having a name starting by anything else than "price_".

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

  • Posts: 58
  • Thank you received: 0
9 years 5 months ago #232326

YES! :woohoo:

Work very well... i changed the name of the field to price_list from colonnaprezzi and now it's ok!

Thank You

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

Time to create page: 0.113 seconds
Powered by Kunena Forum