Skip to main content

how to display 3 different price for each product

More
14 years 7 months ago #39553 by solomon2773
Hi,
Currently have Essential version and would like to display something like below.
[strike]List price : 750[/strike]
Discount : 250(30%)off

Our price : 500

Hope you can help to let me know how to do this.
In your demo page, i can see you do have the first line and the last line.
However, for the version i got does not have the same format as in your demo page.

Thanks,
Solomon

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

More
14 years 7 months ago #39717 by nicolas
Hi,

To have the same display as our demo website, you need to change the option "show discounted price" in the hikashop options of your menu/module (you can access them via the menus Display->Content menus/modules).

further on, to have a display like you want, you will have to edit the file "listing_price" of the view "product" via the menu Display->Views and change the code to adapt it to what you want.

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

More
14 years 7 months ago #39739 by solomon2773
do you have any info that i can follow up to make the change of the "listing_price"?
Thanks

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

More
14 years 7 months ago #39873 by nicolas
You need to move the disount display block of code before the price display block in that file.

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

More
14 years 7 months ago #40004 by solomon2773
Would you please teach which part is which?
I have no idea about the php code.

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

More
14 years 7 months ago #40212 by nicolas
That's the discount display block:
Code:
if(!empty($this->row->discount)){ if($this->params->get('show_discount')==1){ echo '<span class="hikashop_product_discount">'.JText::_('PRICE_DISCOUNT_START'); if(bccomp($this->row->discount->discount_flat_amount,0,5)!==0){ echo $this->currencyHelper->format(-1*$this->row->discount->discount_flat_amount,$price->price_currency_id); }elseif(bccomp($this->row->discount->discount_percent_amount,0,5)!==0){ echo -1*$this->row->discount->discount_percent_amount.'%'; } echo JText::_('PRICE_DISCOUNT_END').'</span>'; }elseif($this->params->get('show_discount')==2){ echo '<span class="hikashop_product_price_before_discount">'.JText::_('PRICE_DISCOUNT_START'); if($this->params->get('price_with_tax')){ echo $this->currencyHelper->format($price->price_value_without_discount_with_tax,$price->price_currency_id); } if($this->params->get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax')){ echo $this->currencyHelper->format($price->price_value_without_discount,$price->price_currency_id); } if($this->params->get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } if($this->params->get('show_original_price') && !empty($price->price_orig_value_without_discount_with_tax)){ echo JText::_('PRICE_BEFORE_ORIG'); if($this->params->get('price_with_tax')){ echo $this->currencyHelper->format($price->price_orig_value_without_discount_with_tax,$price->price_orig_currency_id); } if($this->params->get('price_with_tax')==2){ echo JText::_('PRICE_BEFORE_TAX'); } if($this->params->get('price_with_tax')==2||!$this->params->get('price_with_tax') && !empty($price->price_orig_value_without_discount)){ echo $this->currencyHelper->format($price->price_orig_value_without_discount,$price->price_orig_currency_id); } if($this->params->get('price_with_tax')==2){ echo JText::_('PRICE_AFTER_TAX'); } echo JText::_('PRICE_AFTER_ORIG'); } echo JText::_('PRICE_DISCOUNT_END').'</span>'; }elseif($this->params->get('show_discount')==3){ } }
The main price display block starts with this:
Code:
echo '<span class="'.implode(' ',$classes).'">'; if($this->params->get('price_with_tax')){ echo $this->currencyHelper->format($price->price_value_with_tax,$price->price_currency_id); }

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

Time to create page: 0.170 seconds
Powered by Kunena Forum