Price Sort vs Price Value

  • Posts: 89
  • Thank you received: 2
  • Hikashop Multisite
9 months 3 weeks ago #359442

-- HikaShop version -- : 5.0.2

Hi,

I have export the products list and there is 2 section where price sort column and price value column.
The value are same both column.
May i know what is the different between these 2 column and when to use this column.



Thanks.

Attachments:

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

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
9 months 3 weeks ago #359443

Hi,

When you edit a product in HikaShop, in the Prices area, you can add several prices: For different quantities, for different users, for different user groups, etc.
If you configure several prices for a product, you will have them separated by a | in the price_value column when you export the product.
This allows for exporting / importing several prices for a product.

The product_sort_price always only has one value. When you save a product, HikaShop will try to find the most appropriate price to fill it automatically.

The 2 biggest benefits of having the product_sort_price are:
- when you have filters on the price, it drastically complexify the MySQL query to load the products of a listing. If you have a lot of products on your shop, it can require a lot of time to process the MySQL query for your MySQL server because it needs to look at the different prices of a product in order to find the one to use on the fly. So, in such cases, you can instead configure your filter to rely on the product_sort_price column. It will be much faster.
- Due to the same problem, the "ordering column" setting of products listing menu items and modules don't offer you the possibility to sort the products based on their prices. However, you can select there the product_sort_price.

The biggest disadvantage of the product_sort_price is that it can potentially get out of sync with the prices of the product (for example, if you modify the price of the products via your PHPMyAdmin and you don't update the product_sort_price to reflect that change), or not reflect accurately the prices you want to be used for the filtering / sorting.

For an export where your products only have one price, I would thus recommend using the price_value column.

The following user(s) said Thank You: alainz

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

Time to create page: 0.062 seconds
Powered by Kunena Forum