- Posts: 3
- Thank you received: 0
how to display 3 different price for each product
- solomon2773
-
Topic Author
- Offline
Less
More
14 years 7 months ago #39553
by solomon2773
how to display 3 different price for each product was created 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
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.
14 years 7 months ago #39717
by nicolas
Replied by nicolas on topic Re: how to display 3 different price for each product
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.
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.
- solomon2773
-
Topic Author
- Offline
Less
More
- Posts: 3
- Thank you received: 0
14 years 7 months ago #39739
by solomon2773
Replied by solomon2773 on topic Re: how to display 3 different price for each product
do you have any info that i can follow up to make the change of the "listing_price"?
Thanks
Thanks
Please Log in or Create an account to join the conversation.
14 years 7 months ago #39873
by nicolas
Replied by nicolas on topic Re: how to display 3 different price for each product
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.
- solomon2773
-
Topic Author
- Offline
Less
More
- Posts: 3
- Thank you received: 0
14 years 7 months ago #40004
by solomon2773
Replied by solomon2773 on topic Re: how to display 3 different price for each product
Would you please teach which part is which?
I have no idea about the php code.
I have no idea about the php code.
Please Log in or Create an account to join the conversation.
14 years 7 months ago #40212
by nicolas
Replied by nicolas on topic Re: how to display 3 different price for each product
That's the discount display block:
The main price display block starts with this:
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){
}
}
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