- Posts: 51
- Thank you received: 4
Display of lowest price for products with several variants
- anders.drejer
-
Topic Author
- Offline
Less
More
6 years 10 months ago #313113
by anders.drejer
-- HikaShop version -- : 4.2.2
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.24
Is there at way to have the lowest price displayed on the "mother product" of a product with several variants and several prices? Something like "Prices from xxx" where xxx should be replaced with the lowest price.
Best Regards,
Anders
-- Joomla version -- : 3.9.13
-- PHP version -- : 7.2.24
Is there at way to have the lowest price displayed on the "mother product" of a product with several variants and several prices? Something like "Prices from xxx" where xxx should be replaced with the lowest price.
Best Regards,
Anders
Please Log in or Create an account to join the conversation.
6 years 10 months ago #313125
by nicolas
Replied by nicolas on topic Display of lowest price for products with several variants
Hi,
You're talking about the product listings on the frontend?
Yes, in the settings under the "products options" tab of your menu item, you have a setting "Which price" that you can set to "cheapest". That way, if the main product has several prices, it will display the cheapest on the listing, and if the main product has no price but its variants have prices, it will display the cheapest of the variants prices on the listing.
You're talking about the product listings on the frontend?
Yes, in the settings under the "products options" tab of your menu item, you have a setting "Which price" that you can set to "cheapest". That way, if the main product has several prices, it will display the cheapest on the listing, and if the main product has no price but its variants have prices, it will display the cheapest of the variants prices on the listing.
Please Log in or Create an account to join the conversation.
- anders.drejer
-
Topic Author
- Offline
Less
More
- Posts: 51
- Thank you received: 4
6 years 10 months ago - 6 years 10 months ago #313143
by anders.drejer
Replied by anders.drejer on topic Display of lowest price for products with several variants
Thanks, this is OK .... I am not a programmer, but is it not not possible to in this case ("main product" with no price and variants with different prices) put some words before the price shown on the main product - some like "Prices from " and then the lowest price?
Best Regards,
Anders
Best Regards,
Anders
Last edit: 6 years 10 months ago by anders.drejer.
Please Log in or Create an account to join the conversation.
6 years 10 months ago #313146
by nicolas
Replied by nicolas on topic Display of lowest price for products with several variants
Hi,
You will have to do some code modification:
www.hikashop.com/forum/product-category-...ice-from.html#275671
But if the solution proposed there is ok with you, then it's a simple copy/paste.
You will have to do some code modification:
www.hikashop.com/forum/product-category-...ice-from.html#275671
But if the solution proposed there is ok with you, then it's a simple copy/paste.
The following user(s) said Thank You: anders.drejer
Please Log in or Create an account to join the conversation.
- anders.drejer
-
Topic Author
- Offline
Less
More
- Posts: 51
- Thank you received: 4
6 years 10 months ago - 6 years 10 months ago #313174
by anders.drejer
Replied by anders.drejer on topic Display of lowest price for products with several variants
I assume, that the line from
www.hikashop.com/forum/product-category-...ice-from.html#275671
should be added to this:
But where in the file should the line <?php if($this->row->has_options) echo 'Price from '; ?> be added?
And is it possible to make translations in a multilingual site?
Best Regards,
Anders
But where in the file should the line <?php if($this->row->has_options) echo 'Price from '; ?> be added?
And is it possible to make translations in a multilingual site?
Best Regards,
Anders
Last edit: 6 years 10 months ago by anders.drejer.
Please Log in or Create an account to join the conversation.
6 years 10 months ago #313197
by nicolas
Replied by nicolas on topic Display of lowest price for products with several variants
Hi,
That's the cart / listing_price.php view file in your screenshot, but you need to add your code in product / listing_price.php
You can add the code at the top of the file after the first <?php tag
You can use translations like this:
<?php if($this->row->has_options) echo JText::_('MY_TRANSLATION'); ?>
And then you can add such line as a translation override:
MY_TRANSLATION="Price from "
That's the cart / listing_price.php view file in your screenshot, but you need to add your code in product / listing_price.php
You can add the code at the top of the file after the first <?php tag
You can use translations like this:
<?php if($this->row->has_options) echo JText::_('MY_TRANSLATION'); ?>
And then you can add such line as a translation override:
MY_TRANSLATION="Price from "
The following user(s) said Thank You: anders.drejer
Please Log in or Create an account to join the conversation.
Time to create page: 0.166 seconds