Post by kennyd » Mon Mar 21, 2016 2:17 am

So I have a customized store and right now my product options go by % and not $
Not sure why opencart doesn't give the option but thats another topic.

So right now if a product of mine is 10% more it will say
(+10%) in the option selection

But I want it to say (Price +10%)
So I just want to add the word PRICE to what is already there.
Can someone tell me if this is possible and which file i can add this text to?

Newbie

Posts

Joined
Fri Feb 19, 2016 6:41 am

Post by cyclops12 » Mon Mar 21, 2016 3:35 am

it will depend on what mods or extensions you are using

have you got a link to your site, it might help others to help you

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by abxweb » Mon Mar 21, 2016 3:42 am

Go to:
/catalog/view/theme/default/template/product/product.tpl

Replace that file with the one in the attachment. If you want a VQMod tell me, i will write for u.

Note: This works only with default theme, havent tested it on any custom theme. Also, make backup of the original product.tpl file before you make any changes.

Check my FREE extension - Frontend Admin Toolbar
http://www.opencart.com/index.php?route ... n_id=26059

For any inquiry or questions contact me at: abxweb[at]outlook[dot]com


User avatar
New member

Posts

Joined
Fri Mar 04, 2016 5:47 pm
Location - Serbia

Post by kennyd » Mon Mar 21, 2016 4:32 am

thanks for the example!
My site is custom and I actually thought this would be a matter of changing a single line of code.
I looked at your product.tpl file and searched for Price but its listed many places. It's beyond my skills to convert it to my theme.

I think I'll leave this up to my programmer. I was hoping it was just an easy thing.

Newbie

Posts

Joined
Fri Feb 19, 2016 6:41 am

Post by abxweb » Mon Mar 21, 2016 5:36 am

Code: Select all

<modification>
   <id>Adding Price</id>
   <version>1.0</version>
   <vqmver>2.5.1</vqmver>
   <author>ABxWeb</author>
   <file path="catalog/view/theme/*/template/product/" name="product.tpl">
    <operation info="Adding the Price text">
         <search position="replace"><![CDATA[ (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)]]></search>
         <add><![CDATA[ (<?php echo "Price: ".$option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)]]></add>
    </operation>
    </file>
</modification>
Here is a small VQmod for you, try it on your custom theme.

Check my FREE extension - Frontend Admin Toolbar
http://www.opencart.com/index.php?route ... n_id=26059

For any inquiry or questions contact me at: abxweb[at]outlook[dot]com


User avatar
New member

Posts

Joined
Fri Mar 04, 2016 5:47 pm
Location - Serbia

Post by kennyd » Mon Mar 21, 2016 5:42 am

abxweb

I place this in the product.tpl file?

Newbie

Posts

Joined
Fri Feb 19, 2016 6:41 am

Post by abxweb » Mon Mar 21, 2016 7:12 am

You need to have VQMod installed, and then make a new .xml file in the vqmod/xml folder and paste the contend i wrote for you.

Check my FREE extension - Frontend Admin Toolbar
http://www.opencart.com/index.php?route ... n_id=26059

For any inquiry or questions contact me at: abxweb[at]outlook[dot]com


User avatar
New member

Posts

Joined
Fri Mar 04, 2016 5:47 pm
Location - Serbia
Who is online

Users browsing this forum: No registered users and 26 guests