Jump to content

[solved] Changing sizes doesn't update until refreshing page


Antakarana

Recommended Posts

Hi everybody!

 

I have detected a strange bug on prestashop.

 

If a customer is placed at frontend and select diferent sizes from a product, the prices and the stock will update while he changes from one size to another...

 

However if I put this customer on a new customer group (Business customers) then the prices and the stock quantities will not be updated while he changes from one size to another...

 

:wacko: :wacko: :wacko: :wacko:

 

I think it has to be with the template... So I'm going to install the shop on a test server and change from the installed theme to a the default theme and see how it works...

 

Meanwhile, could anybody gave me a clue about what could be happening? Why it doesn't show correct specific prices or stock when changeing customer's group?

 

thanks in advance

Edited by Antakarana (see edit history)
Link to comment
Share on other sites

OK I've made a new discover...

 

I create a new customer group... and I set a customer from the "business group" to the new one... now it works.

 

I apply the specific prices rules from the "business group" to the to the new customer group and it still works...

 

Now it change back the customer to the "business group" and it stops working again...

 

So it seems that the "business group" has some kind of bug but it has no sense for me... :wacko: :wacko:

Link to comment
Share on other sites

I have to reopen the thread because the issue was not fixed... It seems that it is a bug that should be fixed since prestashop 1.6.1.5 (I'm using 1.6.0.9) so I installed the product.php file from prestashop 1.6.1.11 into the site... but it didn't fix the problem so I rolled back the product.php from 1.6.0.9

 

Maybe it has to be with the theme... I will post any news...

 

any help will be apreciated!

Link to comment
Share on other sites

It seems I have found the fix thanks to this thread:

 

http://forge.prestas...owse/PSCSX-8036

 

In summary.. at mytheme/js/product.js there is a line which looks like this:

    // If a specific price redefine the combination base price
    if (combination.specific_price && combination.specific_price.price > 0)
        basePriceWithoutTax = combination.specific_price.price;

So I've replaced the avobe code by this one:

    // If a specific price redefine the combination base price
    if (combination.specific_price && combination.specific_price.price > 0)
        { basePriceWithoutTax = +combination.specific_price.price; basePriceWithTax = +combination.specific_price.price * (taxRate/100 + 1); }

Now the issue is fixed... so when the user selects between the different combinations of the product, the prices and the stock quantities are updated and shown on real time...

 

Notice that on the first attempt I have had an error message indicating that It was not possible to add the product to the cart, so I have cleaned cache and now it seems to work :)

 

I will do some test but I think it is definetly solved... :rolleyes:

Link to comment
Share on other sites

  • 3 years later...

@Antakarana, you are a gentleman. In a community of people too lazy to reply/post you've given us a solution to a problem I'm facing. Thank you.

Note that I can no longer access your forge link since I think they've moved to GitHub.
Is there a link equivalent perhaps?

Edited by Estian (see edit history)
Link to comment
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
×
×
  • Create New...