Jump to content

[v1.6.1.13] Using <a href "#" to open a popup, reset product quantity in product page


Nandos

Recommended Posts

Ok, that's weird. As title says, if you use the tag <a href="#", for example to open a popup with onclick method, it moves you to the top of the page and the quantity of the product you're looking at the moment is reset, so it puts the product as orderable and not available anymore.

I guess the problem derives from the fact that PS adds the # at the end of the link when you click on your popup opener, and it detects that as a part of a combination that doesn't exist, so it says no quantity for it.

I had to fix this popup problem with a javascript function, but i guess you should look at this problem.

Let me know.

Link to comment
Share on other sites

Ok, that's weird. As title says, if you use the tag <a href="#", for example to open a popup with onclick method, it moves you to the top of the page and the quantity of the product you're looking at the moment is reset, so it puts the product as orderable and not available anymore.

I guess the problem derives from the fact that PS adds the # at the end of the link when you click on your popup opener, and it detects that as a part of a combination that doesn't exist, so it says no quantity for it.

I had to fix this popup problem with a javascript function, but i guess you should look at this problem.

Let me know.

 

Do you know that "href" is not a required attribute for anchors? :)

Link to comment
Share on other sites

Oh yeah, after the thread i tried several methods in a test server, even taking away the #, but in that case it tends to open the popup, refreshing the original page. I even put there the link directly but it opens the popup page in the original page as well. I even redirected the anchor to a specific part of the product page, like the footer for example, but it added the #footer at the end of the URL, that let the bug re-appaering.

Odd

Link to comment
Share on other sites

  • 7 months later...

Hi. i have same problem. Using presta 1.6.1.17

So, have problem when trying add simple anchor on product page - problem like Nandos. Refresh page - product available again and anchor works fine.

Problem similar as here https://www.prestashop.com/forums/topic/476537-link-to-anchor-in-product-page-let-add-to-cart-button-dissapear/?tab=comments#comment-2168646

Problem like here https://www.prestashop.com/forums/topic/456072-bug-1610-product-unavailable-when-clicking-reviews/?tab=comments#comment-2355586

As i can see - its a not a constant bug. But seems it have no solution.

So I can not use any anchor on product page and modules based on anchor (like comments and etc)

 

 

 

 

Link to comment
Share on other sites

[solved] Hi. i have same problem. Using presta 1.6.1.17

So, have problem when trying add simple anchor on product page - problem like Nandos. Refresh page - product available again and anchor works fine.

Problem similar as here https://www.prestashop.com/forums/topic/476537-link-to-anchor-in-product-page-let-add-to-cart-button-dissapear/?tab=comments#comment-2168646

Problem like here https://www.prestashop.com/forums/topic/456072-bug-1610-product-unavailable-when-clicking-reviews/?tab=comments#comment-2355586

As i can see - its a not a constant bug. But seems it have no solution.

So I can not use any anchor on product page and modules based on anchor (like comments and etc)

 

problem solved https://github.com/PrestaShop/PrestaShop/pull/5280/commits

 

 

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