Site logo

Archived topic

Sticky add to cart issue

4 replies · Started by Pedro on April 25, 2019

Viewing posts 1–5 of 5

Hello! I need you to please help me with a problem.

I currently use a plugin to convert currencies, this is:

What happens is that for some currencies, the price approaches, for example:

https://www.pricebasedcountry.com/

If a price to change in COP would be $75.829, approaching would be $75.850

The problem is that, with the sticky add to cart, it shows the price without the approximate ($75.829, not $75.850) and this can confuse customers.

I send some screenshots that explain it better:

https://mega.nz/#!v4V2WQgb!rCxvpxr0NPr-r5Akjazxy9Aaqw4KkyavNJVlgM3uq3A
https://mega.nz/#!q9MEWapK!orELxlorFV4T-IDdBit4AdFPsN4lVzk6BACsc2lbxz8

How can I correct this?

Hi there,

It's likely that the plugin isn't aware of the second price, so it's not working its magic to change it. It might be worth asking the plugin author if it's possible to apply their plugin to other prices on the page.

Hello Tom!

I contacted the support of the coin plugin and this was the response of the developer:

"Hi Pedro,

I checked your site, and It seems a problem relate to the “sticky add to cart” code. The “sticky add to cart” code is using the function product->get_price() instead of $product->get_price_html(). For variable products, the $product->get_price() function returns the value of the database without apply the round function.

This code issue is causing another problem: the “Load product price in the background” function can’t refresh the “sticky add to cart” price, because it does not include the PBoC classes."

So if we use $product->get_price_html(), it will solve both issues? I'll take a look and see if it's something we can update in 1.8.2.

Hello Tom!

That's what the creator of the plugin gives me to understand, thank you very much for your help!

This archived topic is closed to new replies.