Prices range from-to

  • Posts: 171
  • Thank you received: 9
9 years 5 months ago #234634

-- HikaShop version -- : 2.6.1.

Hi!

If I add a characteristics parameter, and there are different prices to different characteristics values, the product page and the products listing shows just the default (main item's) price.

Do I have the option to show prices in a from-to range? I can not find anywhere it in the configuration...

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

  • Posts: 84307
  • Thank you received: 13701
  • MODERATOR
9 years 5 months ago #234674

Hi,

Yes. There is such setting. Edit your menu item via the Joomla menu manager, you'll find the option "Which price" where you can select "range".

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

  • Posts: 171
  • Thank you received: 9
9 years 5 months ago #234688

Yes, meanwhile I found it, but setting it to range does not helped.
I attach screenshots fpr you.

Edit: I found the solution. The main product's price shouldn't have to be set, and I also edited the product/listing_price.php arund line 79.

if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $this->params->get('per_unit',1)){
	if($price->price_min_quantity>1){
		echo '<span class="hikashop_product_price_per_unit_x" style="display:block;">'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity).':</span><br/>';
	}else{
		$tobbar = count($this->row->prices);			
		if(($i+1 == $tobbar) && ($i > 0)) {
			echo " and ";
		}
		else {
		echo '<span class="hikashop_product_price_per_unit" style="display:block;">'.JText::_('PER_UNIT').':</span><br/>';
		}
	}
}

and

added lines around line 209.
$tobbar = count($this->row->prices);			
if(($i+1 == $tobbar) && ($i > 0)) {
	echo "prices between";
}

For product page line 43. has to be modified:
if(empty($this->row->prices)){
	if(!empty($this->element->variants)&&$this->config->get('variant_increase_perf',1)&&!empty($this->element->main)){}
else{echo JText::_('FREE_PRICE');}
Maybe it's not too correct grammatically in English, but on my native language it's OK now.

Thanks for your help!

Last edit: 9 years 5 months ago by pepecortez. Reason: Found solution

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

  • Posts: 84307
  • Thank you received: 13701
  • MODERATOR
9 years 5 months ago #234707

Hi,

If you set prices in the main product, it's these prices which are used on the listing. If you don't, it will display the range of prices of the variants.
So remove the prices in the main product, and you'll see that it works like you want.

The following user(s) said Thank You: pepecortez

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

Time to create page: 0.058 seconds
Powered by Kunena Forum