price customation in product view

  • Posts: 7
  • Thank you received: 0
11 years 3 months ago #143270

-- HikaShop version -- : 2.2.3
-- Joomla version -- : 3.2
-- PHP version -- : 5.4.4

Please assist with ideas to change the pricing text in product view.

Current view states the following:

R 5,15 per unit for buying at least 100
R 4,15 per unit for buying at least 200
R 3,20 per unit for buying at least 500
R 2,65 per unit for buying at least 1000
R 2,30 per unit for buying at least 2000
R 2,05 per unit for buying at least 5000

Can this wording change to:

R 5,15 per unit for 100 - 199
R 4,15 per unit for 200 - 499
R 3,20 per unit for 500 - 999
R 2,65 per unit for 1000 - 1999
R 2,30 per unit for 2000 - 4000
R 2,05 per unit for 5000 - 10000

Baring in mind that the pricing qty's for different products may change. I need to have the second value, ie 100 - 199 must be calculated 1 less than the next price break. eg from 200

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

  • Posts: 83827
  • Thank you received: 13571
  • MODERATOR
11 years 3 months ago #143355

Hi,

In order to do that you need to edit the file "listing_price" of the view "product" via the menu Display>Views and change the code:

foreach($this->row->prices as $price){

to:
foreach($this->row->prices as $k => $price){

and:
echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity).'</span>';

to:
echo '<span class="hikashop_product_price_per_unit_x"> per unit for '.$price->price_min_quantity.' - '.(isset($this->row->prices[$k+1])? ($this->row->prices[$k+1]->price_min_quantity-1) : 10000).'</span>';

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

Time to create page: 0.052 seconds
Powered by Kunena Forum