Jump to content

Edit History

Wilendar

Wilendar

Hello,

Is there any way to display both prices (specific and basic) in the product page and catalog view ?

I have set specific price for each product individually, each product have different specific price for each customer group, how to display it with basic price (crossed out) on the product page?

Can anyone help me please?

I have found code for prestashop 1.6 but it won't work on 1.7

Quote

Hi,

 

For the  1.6 version you can access prices from the 61 to 77 :



{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
							<div class="content_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
								{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
									<span itemprop="price" class="price product-price">
										{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
									</span>
									<meta itemprop="priceCurrency" content="{$priceDisplay}" />
									{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
										<span class="old-price product-price">
											{displayWtPrice p=$product.price_without_reduction}
										</span>
										{if $product.specific_prices.reduction_type == 'percentage'}
											<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
										{/if}
									{/if}
								{/if}
							</div>
						{/if}

 

 

Wilendar

Wilendar

Hello,

Is there any way to display both prices (specific and basic) in the product page and catalog view ?

I have set specific price for each product individually, each product have different specific price for each customer group, how to display it with basic price (crossed out) on the product page?

I have found code for prestashop 1.6 but it won't work on 1.7

Quote

Hi,

 

For the  1.6 version you can access prices from the 61 to 77 :


{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))}
							<div class="content_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
								{if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)}
									<span itemprop="price" class="price product-price">
										{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}
									</span>
									<meta itemprop="priceCurrency" content="{$priceDisplay}" />
									{if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0}
										<span class="old-price product-price">
											{displayWtPrice p=$product.price_without_reduction}
										</span>
										{if $product.specific_prices.reduction_type == 'percentage'}
											<span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span>
										{/if}
									{/if}
								{/if}
							</div>
						{/if}

 

 

Wilendar

Wilendar

Hello,

Is there any way to display both prices (specific and basic) in the product page and catalog view ?

I have set specific price for each product individually, each product have different specific price for each customer group, how to display it with basic price (crossed out) on the product page?

I have found code for prestashop 1.6 but it won't work on 1.7

Quote

Hi,

 

For the  1.6 version you can access prices from the 61 to 77 :

{if (!$PS_CATALOG_MODE AND ((isset($product.show_price) && $product.show_price) || (isset($product.available_for_order) && $product.available_for_order)))} <div class="content_price" itemprop="offers" itemscope itemtype="http://schema.org/Offer"> {if isset($product.show_price) && $product.show_price && !isset($restricted_country_mode)} <span itemprop="price" class="price product-price"> {if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if} </span> <meta itemprop="priceCurrency" content="{$priceDisplay}" /> {if isset($product.specific_prices) && $product.specific_prices && isset($product.specific_prices.reduction) && $product.specific_prices.reduction > 0} <span class="old-price product-price"> {displayWtPrice p=$product.price_without_reduction} </span> {if $product.specific_prices.reduction_type == 'percentage'} <span class="price-percent-reduction">-{$product.specific_prices.reduction * 100}%</span> {/if} {/if} {/if} </div> {/if}

 

Wilendar

Wilendar

Hello,

Is there any way to display both prices (specific and basic) in the product page and catalog view ?

I have set specific price for each product individually, each product have different specific price for each customer group, how to display it with basic price (crossed out) on the product page?

×
×
  • Create New...