Jump to content
Jack_mcs

Compare My Price

Recommended Posts

Hi Jack,

I tried and didn't work.

I have used the code you write and my original code:

 

preg_match('/([\d.]+)/', strip_tags($price[0]), $match);

 

I dont want to be the cause for a headache..ok?

Any idea ?

Share this post


Link to post
Share on other sites

Please provide the link to the page you are looking at and I will give it a try when I get the chance.

Share this post


Link to post
Share on other sites

I finally got a chance to test this and it worked fine for me. The only thing different is that I used the following as the search string, as mentioned in the text on the CompareMyPrice page in admin

<span id="product_price">(.*)</span>

Share this post


Link to post
Share on other sites

Hi Jack,

Their have made changes since oct 17

I'll try to explain:

In oct 17 their prices are show in DOP Pesos (not USD, 1USD = 40DOP) (primary currency=DOP).

In nov 12 their prices are show in USD and DOP (both) (primary currency=USD).

now their "product_price" is for USD currency (works fine for prices under 999) (primary currency=USD).

now their "product_alt_price" is for DOP currency (works fine for prices under 999, but not works for prices over 999) (primary currency=USD).

But in my store the primary currency is DOP Pesos not USD. (remember 1USD = 40DOP)

When i try to compare with <span id="product_alt_price">(.*)</span> dont work because USD500 = DOP20,000 (primary currency showed in my store).

Hope you understand me.

Thanks Jack

Share this post


Link to post
Share on other sites

There's nothing in this contribution to account for comparing different currencies. It assumes you will be comparing to a site using the same as your site.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×