How to change pricing bulk discount display?

  • Posts: 46
  • Thank you received: 7
12 years 1 week ago #82085

Hi there! I'm trying to make some changes to the way discount pricing for more than one item is displayed in the product view.

Currently the product pricing is displayed like this:
£ 270.95 each
£ 250.00 per unit for buying at least 3
£ 220.00 per unit for buying at least 10

I want the text to display in this format:
£ 270.95 each
3 or more - £250.00
10 or more - £220.00

I think I've identified the correct view to edit - Display > Views > Product > Listing-price.

The area I think I need to amend is:

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');
        }

Can anyone help?

Thanks - Leo

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

  • Posts: 83023
  • Thank you received: 13403
  • MODERATOR
12 years 1 week ago #82177

You need to remove that line:

echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity);

and add that code :
if(isset($price->price_min_quantity) && empty($this->cart_product_price) && $this->params->get('per_unit',1)){
        if($price->price_min_quantity>1){
          echo sprintf('%s or more - ',$price->price_min_quantity);
        }
}

after:
echo '<span class="'.implode(' ',$classes).'">';

Last edit: 11 years 9 months ago by Jerome.
The following user(s) said Thank You: lcoombes

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

  • Posts: 46
  • Thank you received: 7
12 years 1 week ago #82226

Many thanks Nicolas! That worked a treat! Your help is much appreciated!

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

  • Posts: 69
  • Thank you received: 5
11 years 10 months ago #88880

This worked great for me too however i have one more request... :S

how can I add the word ' each' to the end. So it would be like this:

100 or more - $0.70 each
300 or more - $0.65 each
500 or more - $0.60 each

yourlenscases.com/index.php/your-lens-ca...ll-lightblue/product

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

  • Posts: 83023
  • Thank you received: 13403
  • MODERATOR
11 years 10 months ago #89055

Then, instead of removing the line:
echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity);

you can replace it by:
echo JText::_('PER_UNIT');

and also add the code of my previous message.

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

  • Posts: 69
  • Thank you received: 5
11 years 10 months ago #89232

That worked perfect.. but... Now it's indented??

yourlenscases.com/index.php/your-lens-ca...ell-lavender/product

Do you think it's my template?

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

  • Posts: 46
  • Thank you received: 7
11 years 10 months ago #89235

Hi Mindstorm

Yes - it's your CSS. If you look at frontend_default.css, line 154, you'll see the text align is centred - you need to set this to left to remove the indent:

span.hikashop_product_price_full {
display: block;
font-weight: bold;
margin-bottom: 5px;
text-align: center;
}

Good luck!

The following user(s) said Thank You: Xavier

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

  • Posts: 60
  • Thank you received: 8
11 years 10 months ago #90477

Hi all. In the list of goods and in the pages of goods, price and discount shows without blank space " 10 500 rub.8 400 rub. "
And how to show old price (before discount) on the product page? Because i have only discount and price with discount on the product page.

Last edit: 11 years 10 months ago by parsanches.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #90637

Hi,

You can edit the view "product / listing_price" to add a space.
To display the both prices on the product page, go in HikaShop > Config > Display > Product, and change the value for the option "Show discounted price".

The following user(s) said Thank You: parsanches

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

  • Posts: 60
  • Thank you received: 8
11 years 10 months ago #90699

Thanks a lot. but with my knowledge of programming it will be very difficult to find a place where to change it.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #90817

Hi,

After looking at the code, you don't have to edit the file, but just add a space in the translation of the key "PRICE_DISCOUNT_END".
www.hikashop.com/fr/support/documentation/faq.htm#translation

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

  • Posts: 60
  • Thank you received: 8
11 years 10 months ago #90878

The value of this field is displayed strikethrough. And space also is strikethrough. I need to make more changes in old price, such as the output value in another place, and its redesign in css.
As i understand i need to make changes in css file and edit the view in "product / listing_price" ?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 10 months ago #90920

Yes.
And in the view "product / listing_price" you can add a space befo the tag </span> in the lines "echo JText::_('PRICE_DISCOUNT_END').'</span>';"

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

  • Posts: 69
  • Thank you received: 5
11 years 9 months ago #92769

is there a way to make the price display 'or more' just on the highest pricing tier...:

100 - $.75 ea
300 - $.85 ea
500 or more - $.60 ea

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

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

Yes, in the view "product / listing_price" you can add a if condition around:

echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity);
Like:
if(count($this->row->prices) != $i)
echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity);
else
echo JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT_OR_MORE',$price->price_min_quantity);

and add a translation for:
"PER_UNIT_AT_LEAST_X_BOUGHT_OR_MORE" in the translation file.

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

  • Posts: 69
  • Thank you received: 5
11 years 9 months ago #92940

how does it fit in with this:

      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::_('PER_UNIT');
        }else{
          echo JText::_('PER_UNIT');
        }

Last edit: 11 years 9 months ago by Jerome.

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

  • Posts: 26165
  • Thank you received: 4029
  • MODERATOR
11 years 9 months ago #93142

Hi,

I does not understand your question.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 69
  • Thank you received: 5
11 years 9 months ago #94695

Can I have one product show something different?

One product we sell is 'each' and another product is 'for a box of 10'?

so I need ONE product to say:
$.80 each

and another product to say:
$12.50 for a box of 10

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

  • Posts: 83023
  • Thank you received: 13403
  • MODERATOR
11 years 9 months ago #95104

Yes, that's possible.
We actually have documentation on how to do that in our FAQ:
www.hikashop.com/en/support/documentatio...faq.html#translation

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

  • Posts: 46
  • Thank you received: 7
11 years 7 months ago #102631

Hello again! My customer is being very specific on how the pricing is to be displayed, he wants the following format:
1-2 off = £ xxx.xx ea
3-5 off = £ xxx.xx ea
6-9 off = £ xxx.xx ea
10-24 off = £ xxx.xx ea

Can you advise what I need to change to achieve this?

Many thanks - Leo

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

Time to create page: 0.123 seconds
Powered by Kunena Forum