Post by gally06 » Fri Nov 24, 2017 4:04 am

Hey guys,
Just wandered if anyone can help, I recently started using opencart and got a template which when you add a different price in options for example a bigger weight of the product is an extra £5. So in the options I put +5.00. That's all great

However the problem I have is on the store view for my customers at the side of the option it has in brackets (+5.00) is there anyway I can make that display the actual price of the product not what it is increased by?

The website is grandparkett.com

Thanks for any help in advance.

Newbie

Posts

Joined
Mon Sep 16, 2013 12:59 am

Post by straightlight » Fri Nov 24, 2017 4:23 am

In catalog/controller/product/product.php file,

find:

Code: Select all

$product_option_value_data[] = array(
add above:

Code: Select all

$price = strtr($price, [
							'+' => '',
							'-' => '',
						]);
This should rectify the issue.
Last edited by straightlight on Sat Nov 25, 2017 11:24 pm, edited 1 time in total.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gally06 » Fri Nov 24, 2017 5:47 pm

Hi Straightllight,

Thank you for your reply I added the coding in the line above and when viewing Wieswiel mop on the site when I select the dropdown menu of options it still has in brackets (-£4.16) rather than the actual price?

Newbie

Posts

Joined
Mon Sep 16, 2013 12:59 am

Post by straightlight » Fri Nov 24, 2017 10:12 pm

The changes above are for the product page of Opencart. I do not know what the Wieswiel mop is nor was there any URL provided along with your OC version. Also ensure to clear all caches after making this change.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gally06 » Sat Nov 25, 2017 11:15 pm

Hi bud,
I have added that code to the page above the line you specified and it hasn't made a difference.

The mop is a product with an option the url is below
http://www.grandparkett.com/index.php?r ... search=mop

Newbie

Posts

Joined
Mon Sep 16, 2013 12:59 am

Post by straightlight » Sat Nov 25, 2017 11:24 pm

I have now edited the code above. The float type was the issue.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gally06 » Mon Nov 27, 2017 10:40 am

Hi Mate,
I changed it to the code above still continues to have £-4.16?

Newbie

Posts

Joined
Mon Sep 16, 2013 12:59 am

Post by straightlight » Mon Nov 27, 2017 10:51 am

I cannot reproduce this issue on my end since the edited code. Did you cleared all caches from the admin? From the dashboard and from the modifications?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by gally06 » Mon Nov 27, 2017 12:45 pm

hi bud,
Ye I have cleared all cache and still the same

Newbie

Posts

Joined
Mon Sep 16, 2013 12:59 am

Post by straightlight » Mon Nov 27, 2017 9:59 pm

Since this issue cannot be reproduced on my end, install a fresh copy of Opencart on a virtual server. Then, implement the code and see if you notice the differences.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by MarketInSG » Mon Nov 27, 2017 11:44 pm

gally06 wrote:
Fri Nov 24, 2017 4:04 am
Hey guys,
Just wandered if anyone can help, I recently started using opencart and got a template which when you add a different price in options for example a bigger weight of the product is an extra £5. So in the options I put +5.00. That's all great

However the problem I have is on the store view for my customers at the side of the option it has in brackets (+5.00) is there anyway I can make that display the actual price of the product not what it is increased by?

The website is grandparkett.com

Thanks for any help in advance.
You can try this, saving you time from going round and round: https://www.opencart.com/index.php?rout ... n_id=20150


User avatar
Guru Member

Posts

Joined
Wed Nov 16, 2011 11:53 am
Location - Singapore
Who is online

Users browsing this forum: No registered users and 181 guests