How to show each price on their own row?

  • Posts: 6
  • Thank you received: 0
11 years 9 months ago #88936

Have multiple prices for each product - so called bulk discount.
But Now all are showed in one row and it is really hard to separate those:
9,00 € / tuote7,80 € / tuote ostettaessa ainakin 107,00 € / tuote ostettaessa ainakin 25
While it should be
9,00 € / tuote 7,80 € / tuote ostettaessa ainakin 10 7,00 € / tuote ostettaessa ainakin 25
Or more I prefer this format
9,00 € / tuote
7,80 € / tuote ostettaessa ainakin 10
7,00 € / tuote ostettaessa ainakin 25

Also I want per 1 pc price (no discount) to be shown in main view - discounted prices should be visible when product is "opened".

All help appreciated.

Attachments:

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

  • Posts: 206
  • Thank you received: 26
11 years 9 months ago #88981

vetoveljet wrote: Have multiple prices for each product - so called bulk discount.
But Now all are showed in one row and it is really hard to separate those:
9,00 € / tuote7,80 € / tuote ostettaessa ainakin 107,00 € / tuote ostettaessa ainakin 25
While it should be
9,00 € / tuote 7,80 € / tuote ostettaessa ainakin 10 7,00 € / tuote ostettaessa ainakin 25
Or more I prefer this format
9,00 € / tuote
7,80 € / tuote ostettaessa ainakin 10
7,00 € / tuote ostettaessa ainakin 25

Also I want per 1 pc price (no discount) to be shown in main view - discounted prices should be visible when product is "opened".

All help appreciated.


Regarding the main view price, here's what you need: gyazo.com/a016a43c7052aa4696ed6630d6f6196b.png?1360249357 (the show discounted price/price display method) I'm not sure about the rest though (however i could try) have you got a link to your site i could have?


I'm not an expert at this, if i post on your thread i'm doing so with the best of my knowledge and just trying to help :)

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

  • Posts: 6
  • Thank you received: 0
11 years 9 months ago #89024

Thanks for help but unfortunately it didn't help - change settings as recommed, saved, cleaned cache but still cheapest price is shown...

www.futiskauppa.net/index.php/verkkokaup...tegoria/20-pelisukat

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

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #89092

Hi,

You have to edit the view "product / listing_price" to change the display of it. Add "<br/>" tags to go back to the line.
For the price display, you have to change the option in the associated module of the menu "verkkokauppa". To find it go in HikaShop > Display > Content menu, then click on the menu "verkkokauppa" and on the associated module link.

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

  • Posts: 6
  • Thank you received: 0
11 years 9 months ago #89102

Can you tell me where exactly I should add <br> tags to "cut the line"?

Code:

<?php
/**
* @package HikaShop for Joomla!
* @version 2.0.0
* @author hikashop.com
* @copyright (C) 2010-2012 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
$class ='';
if(!empty($this->row->prices) && count($this->row->prices)>1){
$class = ' hikashop_product_several_prices';
} ?>
<span class="hikashop_product_price_full<?php echo $class; ?>">
<?php
if(empty($this->row->prices)){
echo JText::_('FREE_PRICE');
}else{
$first=true;
echo JText::_('PRICE_BEGINNING');
$i=0;

if($this->params->get('price_with_tax',3)==3){
$config =& hikashop_config();
$this->params->set('price_with_tax',$config->get('price_with_tax'));
}
foreach($this->row->prices as $price){
if($first)$first=false;
else echo JText::_('PRICE_SEPARATOR');
$start = JText::_('PRICE_BEGINNING_'.$i);
if($start!='PRICE_BEGINNING_'.$i){
echo $start;
}
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $price->price_min_quantity>1){
echo '<span class="hikashop_product_price_with_min_qty hikashop_product_price_for_at_least_'.$price->price_min_quantity.'">';
}

$classes = array('hikashop_product_price hikashop_product_price_'.$i);
if(!empty($this->row->discount)){
$classes[]='hikashop_product_price_with_discount';
}

if(!empty($this->row->discount)){
if($this->params->get('show_discount',3)==3){
$config =& hikashop_config();
$this->params->set('show_discount',$config->get('show_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','-1')=='-1'){
$config =& hikashop_config();
$this->params->set('show_original_price',$config->get('show_original_price'));
}
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){

}
}

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);
}
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,$price->price_currency_id);
}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_AFTER_TAX');
}
if($this->params->get('show_original_price','-1')=='-1'){
$config =& hikashop_config();
$this->params->set('show_original_price',$config->get('show_original_price'));
}
if($this->params->get('show_original_price') && !empty($price->price_orig_value)){
echo JText::_('PRICE_BEFORE_ORIG');
if($this->params->get('price_with_tax')){
echo $this->currencyHelper->format($price->price_orig_value_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')){
echo $this->currencyHelper->format($price->price_orig_value,$price->price_orig_currency_id);
}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_AFTER_TAX');
}
echo JText::_('PRICE_AFTER_ORIG');
}
echo '</span> ';
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $this->params->get('per_unit',1)){
if($price->price_min_quantity>1){
echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity);
}else{
echo JText::_('PER_UNIT');
}
}
if($this->params->get('show_price_weight')){
if(!empty($this->element->product_id) && isset($this->row->product_weight) && bccomp($this->row->product_weight,0,3)){

echo JText::_('PRICE_SEPARATOR').'<span class="hikashop_product_price_per_weight_unit">';
if($this->params->get('price_with_tax')){
$weight_price = $price->price_value_with_tax / $this->row->product_weight;
echo $this->currencyHelper->format($weight_price,$price->price_currency_id).' / '.JText::_($this->row->product_weight_unit);
}
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')){
$weight_price = $price->price_value / $this->row->product_weight;
echo $this->currencyHelper->format($weight_price,$price->price_currency_id).' / '.JText::_($this->row->product_weight_unit);
}
if($this->params->get('price_with_tax')==2){
echo JText::_('PRICE_AFTER_TAX');
}
echo '</span>';
}
}
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $price->price_min_quantity>1){
echo '</span>';
}
$end = JText::_('PRICE_ENDING_'.$i);
if($end!='PRICE_ENDING_'.$i){
echo $end;
}
$i++;
}
echo JText::_('PRICE_END');
}
?></span>

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

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #89105

You can add it just before the line: echo '<span class="hikashop_product_price_with_min_qty hikashop_product_price_for_at_least_'.$price->price_min_quantity.'">';
like:

echo '<br /><span class="hikashop_product_price_with_min_qty hikashop_product_price_for_at_least_'.$price->price_min_quantity.'">';

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

  • Posts: 6
  • Thank you received: 0
11 years 9 months ago #89107

Thanks - case closed now.

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

  • Posts: 18
  • Thank you received: 0
9 years 8 months ago #193224

I have the same issue in Hikashop version 2.4.0 but i cannot find the mentioned line in "product / listing_price" .
How can i solve this issue?

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
9 years 8 months ago #193340

Hi,

I still see the same line of th code in that version in that file:
take.ms/T9qEb
Just look again :)

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

  • Posts: 18
  • Thank you received: 0
9 years 8 months ago #193631

Thank you for your reply,

but what i see in line 68 is not the same. See attached printscreen

Attachments:

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

  • Posts: 82906
  • Thank you received: 13378
  • MODERATOR
9 years 8 months ago #193656

I didn't say that the line numbers would match.
Your line 68 matches with my line 59 so just scroll down ~10 lines and you should find the line you're looking for...

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

Time to create page: 0.079 seconds
Powered by Kunena Forum