Should I include anchors in my product URLs?

If your catalog contains products that vary in price depending on the combinations, Facebook may show you errors indicating that the URLs of your products with combinations do not return the correct prices.

This often comes from modules or themes that modify the URLs by changing the behavior of the function:

link->getProductLink

If this function is modified, then the server response will not return the right combination. To correct this, there is a system of anchors in PrestaShop that allows you to allow selection of the combination in the browser. By activating the anchors through the module (through the "Feed data options" tab):

Option for adding anchors to feed URLs

a url like:

https://website/en/clothes/23-164-aerodynamic-rubber-wallet-6665590854675.html

will become:

https://website/en/clothes/23-164-aerodynamic-rubber-wallet-6665590854675.html#/taille-l/couleur-rouge

and this will allow PrestaShop Javascript to select the combination in the browser.

NB: This option only adds anchors in the URLs of the data feed. In no way does it modify the behavior of your site.

An anchor is interpreted in the browser; it is not an HTTP redirect and is not sent to the server in the request. Still check the selected variant and price with your theme and JavaScript; this does not guarantee the behaviour of a crawler that does not process that anchor.

Other FAQs in this category