- Posts: 50
- Thank you received: 1
Change of text after price
- PaulLenton
-
Topic Author
- Offline
Less
More
12 years 5 months ago #153814
by PaulLenton
Change of text after price was created by PaulLenton
-- url of the page with the problem -- :http://www.billbo.co.uk/index.php/ribbons-stickers/satin-ribbon/ribbons
-- HikaShop version -- : 2.3 Business
-- Joomla version -- : 2.5.16
-- PHP version -- : 5.3.28
Hi,
I want to change the text that displays after the price for only some of the products. see web page
www.billbo.co.uk/index.php/ribbons-stick...satin-ribbon/ribbons
We sell this product in 100m rolls and want the price to reflect this. All other products are ok as the default setting.
Current display:
£ 20.00 each
£ 17.50 per unit for buying at least 5
£ 15.00 per unit for buying at least 10
£ 12.50 per unit for buying at least 50
£ 10.00 per unit for buying at least 100
New display:
£ 20.00 per 100m roll
£ 17.50 per 100m roll buying at least 5 rolls
£ 15.00 per 100m roll buying at least 10 rolls
£ 12.50 per 100m roll buying at least 50 rolls
£ 10.00 per 100m roll buying at least 100 rolls
Thanks in advance.
Paul
-- HikaShop version -- : 2.3 Business
-- Joomla version -- : 2.5.16
-- PHP version -- : 5.3.28
Hi,
I want to change the text that displays after the price for only some of the products. see web page
www.billbo.co.uk/index.php/ribbons-stick...satin-ribbon/ribbons
We sell this product in 100m rolls and want the price to reflect this. All other products are ok as the default setting.
Current display:
£ 20.00 each
£ 17.50 per unit for buying at least 5
£ 15.00 per unit for buying at least 10
£ 12.50 per unit for buying at least 50
£ 10.00 per unit for buying at least 100
New display:
£ 20.00 per 100m roll
£ 17.50 per 100m roll buying at least 5 rolls
£ 15.00 per 100m roll buying at least 10 rolls
£ 12.50 per 100m roll buying at least 50 rolls
£ 10.00 per 100m roll buying at least 100 rolls
Thanks in advance.
Paul
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
12 years 5 months ago #153815
by Mohamed Thelji
Replied by Mohamed Thelji on topic Change of text after price
Hello Paul,
Note that you'll be able to do that by editing your translation file .
Note that you'll be able to do that by editing your translation file .
Please Log in or Create an account to join the conversation.
- PaulLenton
-
Topic Author
- Offline
Less
More
- Posts: 50
- Thank you received: 1
12 years 5 months ago #154087
by PaulLenton
Replied by PaulLenton on topic Change of text after price
Hi Mohamed,
I already have a mod for that string. Is there a way to have different text for different products. If you look at the two products I have attached, product 1 is sold as 100m rolls and product 2 is sold in units and is ok as it is.
1 www.billbo.co.uk/index.php/ribbons-stick...satin-ribbon/ribbons
This is what it should be £x.xx per 100m roll if buying at least
2 www.billbo.co.uk/index.php/bears/premier...tion/25cm-cocoa-bear
Thanks
Paul
I already have a mod for that string. Is there a way to have different text for different products. If you look at the two products I have attached, product 1 is sold as 100m rolls and product 2 is sold in units and is ok as it is.
1 www.billbo.co.uk/index.php/ribbons-stick...satin-ribbon/ribbons
This is what it should be £x.xx per 100m roll if buying at least
2 www.billbo.co.uk/index.php/bears/premier...tion/25cm-cocoa-bear
Thanks
Paul
Please Log in or Create an account to join the conversation.
12 years 5 months ago #154100
by Xavier
Replied by Xavier on topic Change of text after price
Hi,
So you will have to edit the view "product / listing_price" and depending on the product id or product category id you have to display one word or another one, ex:
Will become:
Then translations will be:
So you will have to edit the view "product / listing_price" and depending on the product id or product category id you have to display one word or another one, ex:
Code:
if($price->price_min_quantity>1){
echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity).'</span>';
}else{
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT').'</span>';
}
Code:
if($this->row->product_id == 'XX'){
if($price->price_min_quantity>1){
echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT_METER',$price->price_min_quantity).'</span>';
}else{
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT_METER').'</span>';
}
}else{
if($price->price_min_quantity>1){
echo '<span class="hikashop_product_price_per_unit_x">'.JText::sprintf('PER_UNIT_AT_LEAST_X_BOUGHT',$price->price_min_quantity).'</span>';
}else{
echo '<span class="hikashop_product_price_per_unit">'.JText::_('PER_UNIT').'</span>';
}
}
PER_UNIT_AT_LEAST_X_BOUGHT_METER="per 100m roll buying at least %s rolls"
PER_UNIT_METER="per 100m roll"
PER_UNIT_AT_LEAST_X_BOUGHT="PER_UNIT_AT_LEAST_X_BOUGHT=" per unit for buying at least %s"
PER_UNIT="each"
Please Log in or Create an account to join the conversation.
- PaulLenton
-
Topic Author
- Offline
Less
More
- Posts: 50
- Thank you received: 1
12 years 5 months ago #154197
by PaulLenton
Replied by PaulLenton on topic Change of text after price
Hi Xavier,
I have made the changes detailed below ( to the template in use ) but nothing seems to have changed.
I have taken screen shots of the files I have changed for you to verify that I have changed the correct files.
Thanks
Paul
I have made the changes detailed below ( to the template in use ) but nothing seems to have changed.
I have taken screen shots of the files I have changed for you to verify that I have changed the correct files.
Thanks
Paul
Please Log in or Create an account to join the conversation.
12 years 5 months ago #154202
by nicolas
Replied by nicolas on topic Change of text after price
Hi,
Of course, you need to replace XX in the first line by the id of the product for which you want to do the change. If you leave XX, it won't match with any product id and you won't see the difference.
Of course, you need to replace XX in the first line by the id of the product for which you want to do the change. If you leave XX, it won't match with any product id and you won't see the difference.
Please Log in or Create an account to join the conversation.
Time to create page: 0.239 seconds