Jump to content

Auto-update product page after selecting two or more pieces and reset to one piece


bogdanoctavian

Recommended Posts

Hi all members,

I have a Prestashop 1.7 problem that I can't solve on the product page (simple product) When I enter the product page and select two or more pieces of the same product to add to the cart, it automatically refreshes the page and returns to the initial selection of one product. Refresh occurs 1-1.5 seconds after increasing the amount. If during this time I manage to add them to the basket, they appear in the basket after the unexpected refresh. The pop-up "Product successfully added to your cart" doesn't appear either

Products with combinations do not have this problem of automatic refresh of the page when you change the quantity you want to put in the cart and after the addition in the cart also runs a confirmation pop-up "Product successfully added to your cart"

 

Thanks in advance for your help.

Link to comment
Share on other sites

for those who have this problem:

QTY input field on product page resets/snaps to 1 no matter how you input more than one, you need to delete this code in public_html/themes/YOURTHEME/templates/catalog/product.tpl:

{block name='product_refresh'}
      <input class="product-refresh ps-hidden-by-js" name="refresh" type="submit" value="{l s='Refresh' d='Shop.Theme.Actions'}">
{/block}

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

  • 1 year later...

Hi,

Make sure there are no JavaScript conflicts with other modules or custom scripts on your website.

Open your browser's developer console. Look for any JavaScript errors or warnings in console tab. These can provide clues about what's causing the issue.

Clear the Prestashop cache and any server-side caches you may have enabled.

Check your server's error logs for any relevant entries.

Enable PrestaShop's debug mode. This can be done in the config/defines.inc.php file by setting _PS_MODE_DEV_ to true. This will provide more detailed error messages.

If all else fails, consider restoring your website from a known working backup and reapplying any customizations or changes step by step to identify when the issue reoccurs.

If the problem persists and you can't identify the cause, it might be a good idea to consult with a Prestashop expert who can provide proper assistance.

Thanks!

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...