[Skip to main content](#vessel-content)

#   Why use "a href" to add to cart?

##

- **[agrepe](/forum/user/34265-agrepe "View agrepe's Profile")**
- [![agrepe's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34265-agrepe "View agrepe's Profile") Topic Author
- [ Offline](/forum/user/34265-agrepe)

Less More

- Posts: 19
- Thank you received: 2
-
-

5 years 1 week ago [\#336371](#336371) by [agrepe](/forum/user/34265-agrepe "View agrepe's Profile")  *[Why use "a href" to add to cart?](/forum/26-product-category-display/903327-why-use-a-href-to-add-to-cart#336371 "Why use &quot;a href&quot; to add to cart, and not the  or  functions? Indeed, the SEO impact is greatly impacted. thank you for your reply")* was created by *[agrepe](/forum/user/34265-agrepe "View agrepe's Profile")*

Why use "a href" to add to cart, and not the &lt;imput&gt; or &lt;button&gt; functions? Indeed, the SEO impact is greatly impacted.
thank you for your reply

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDMzMjctd2h5LXVzZS1hLWhyZWYtdG8tYWRkLXRvLWNhcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86291
- Thank you received: 14269
-
-

5 years 1 week ago [\#336374](#336374) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Why use "a href" to add to cart?](/forum/26-product-category-display/903327-why-use-a-href-to-add-to-cart#336374 "Why use &quot;a href&quot; to add to cart, and not the  or  functions? Indeed, the SEO impact is greatly impacted. thank you for your reply")*

Hi,

When javascript is disabled / breaking (because of a javascript error on the page for example), for the input or button to work, it requires a form element to be available. With an "a" tag, it can work on its own with just the href being set. So it's easier to manage through the different views.
Also, templates often have a lot of CSS on inputs and buttons, which usually mess with the look of the add to cart button if it's an input or button. With an "a" tag, we can more easily enforce our own default CSS on the add to cart as templates usually have a lot less CSS on them.

You're saying that SEO is greatly impacted by doing that but I've never heard of such a thing. Why do you think SEO is impacted ? I personnally think it doesn't change anything. Do you have any information to back your claim ? I looked a bit online but I couldn't find any information on this. Usually, you want these buttons to not be indexed. That's why, in HikaShop, we add a no-follow no-index HTTP header on the response of these buttons. Thus having inputs or a tags shouldn't change anything regarding SEO.

We actually were using inputs instead of a tags years ago and switched to a tags for all the reasons above.

The following user(s) said Thank You: [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDMzMjctd2h5LXVzZS1hLWhyZWYtdG8tYWRkLXRvLWNhcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[agrepe](/forum/user/34265-agrepe "View agrepe's Profile")**
- [![agrepe's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34265-agrepe "View agrepe's Profile") Topic Author
- [ Offline](/forum/user/34265-agrepe)

Less More

- Posts: 19
- Thank you received: 2
-
-

5 years 1 week ago [\#336393](#336393) by [agrepe](/forum/user/34265-agrepe "View agrepe's Profile")  Replied by *[agrepe](/forum/user/34265-agrepe "View agrepe's Profile")* on topic *[Why use "a href" to add to cart?](/forum/26-product-category-display/903327-why-use-a-href-to-add-to-cart#336393 "Why use &quot;a href&quot; to add to cart, and not the  or  functions? Indeed, the SEO impact is greatly impacted. thank you for your reply")*

Bonjour
En terme de popularité globale du site.
Par exemple selon un article de Semrush sur le maillage interne (voici le lien"[ fr.semrush.com/blog/bonnes-pratiques-maillage-interne/](https://fr.semrush.com/blog/bonnes-pratiques-maillage-interne/)")
"Dès 2010, Google avait changé son approche : avoir un lien nofollow dans sa page bloquait la transmission de popularité et pouvait donc nuire au référencement naturel. Plus j'ai de liens nofollow, plus je vais faire diminuer la popularité globale de mon site."

Donc un bouton panier établit sur le fonctionnement d'une balise "a" avec un attribut rel=nofollow ne serait pas logique d'un point de vue semantique.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDMzMjctd2h5LXVzZS1hLWhyZWYtdG8tYWRkLXRvLWNhcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86291
- Thank you received: 14269
-
-

5 years 1 week ago [\#336438](#336438) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Why use "a href" to add to cart?](/forum/26-product-category-display/903327-why-use-a-href-to-add-to-cart#336438 "Why use &quot;a href&quot; to add to cart, and not the  or  functions? Indeed, the SEO impact is greatly impacted. thank you for your reply")*

Bonjour,

Merci pour le lien. C'est très intéressant. Je vois ce que vous voulez dire.
C'est changeable de mettre des input au lieu de tag a assez facilement.
Mais bon, niveau CSS, cela va causer quelques problèmes pour les personnes mettant à jour avec des personnalisations faites incorrectement ou avec des templates avec certains CSS sur les buttons. Et il reste aussi la question du fallback quand le javascript n'est pas disponible. Le bouton ne serait alors plus fonctionnel dans ces cas-là alors que maintenant, il n'y a pas de souci.
Donc bon, à voir. J'aimerais quand même faire le changement si cela peut aider pour le SEO.
Nous allons voir ce que nous pouvons faire.

The following user(s) said Thank You: [agrepe](/forum/user/34265-agrepe "View agrepe's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDMzMjctd2h5LXVzZS1hLWhyZWYtdG8tYWRkLXRvLWNhcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")**
- [![lousyfool's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar28604.jpg)](/forum/user/28604-lousyfool "View lousyfool's Profile")
- [ Offline](/forum/user/28604-lousyfool)

Less More

- Posts: 2143
- Thank you received: 747
-
- [](http://www.inphase.one)
-

5 years 1 week ago -  5 years 1 week ago [\#336439](#336439) by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")  Replied by *[lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile")* on topic *[Why use "a href" to add to cart?](/forum/26-product-category-display/903327-why-use-a-href-to-add-to-cart#336439 "Why use &quot;a href&quot; to add to cart, and not the  or  functions? Indeed, the SEO impact is greatly impacted. thank you for your reply")*

Hi,

Sorry, but this is going the wrong direction.

First, Google defines the use and benefits of "nofollow" attributes (just like other attributes ) very clearly: see [ developers.google.com/search/docs/advanc...alify-outbound-links](https://developers.google.com/search/docs/advanced/guidelines/qualify-outbound-links) and elsewhere.

So, yes, "wrong" use, e.g. for site-internal links, **can** affect ranking negatively, and if only because you're basically attempting to "hide" potentially valuable content from search bots.

And that's it. So, the section in the French article is taken out of context, and both the &lt;a&gt; tag as well as the "nofollow" attribute are making perfectly good sense for the add-to-cart button -- for the reasons as mentioned by Nicolas here above, as well as it enables site owners and users to pass on simple add-to-cart links per email, messengers, etc.

**Please leave the &lt;a&gt; tag as is.** Or, at the very least, give us the option for utilising &lt;a&gt; tags for the purpose like in older HikaShop versions.

Merci beaucoup!

**EDIT:**
Sorry, forgot to mention: the only downside of the &lt;a&gt; tag I can think of is that not all bots respect the "nofollow", eventually leading to "bad bots" causing fewer or more carts being generated. But even that is not a problem as HikaShop gives us -- thankfully -- the option of unused carts being auto-deleted after X days. So, nothing to worry about there, either.

---

Need help with customisations of layouts, style or other site development? [ PM me!](/component/uddeim/?task=new)
(Don't forget to turn on [ "E-mail notification of new messages"](/component/uddeim/?task=settings))

Last edit: 5 years 1 week ago by [lousyfool](/forum/user/28604-lousyfool "View lousyfool's Profile").

The following user(s) said Thank You: [nicolas](/forum/user/63-nicolas "View nicolas's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDMzMjctd2h5LXVzZS1hLWhyZWYtdG8tYWRkLXRvLWNhcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[agrepe](/forum/user/34265-agrepe "View agrepe's Profile")**
- [![agrepe's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/34265-agrepe "View agrepe's Profile") Topic Author
- [ Offline](/forum/user/34265-agrepe)

Less More

- Posts: 19
- Thank you received: 2
-
-

4 years 10 months ago [\#337741](#337741) by [agrepe](/forum/user/34265-agrepe "View agrepe's Profile")  Replied by *[agrepe](/forum/user/34265-agrepe "View agrepe's Profile")* on topic *[Why use "a href" to add to cart?](/forum/26-product-category-display/903327-why-use-a-href-to-add-to-cart#337741 "Why use &quot;a href&quot; to add to cart, and not the  or  functions? Indeed, the SEO impact is greatly impacted. thank you for your reply")*

Bonjour. Concernant notre demande, avez-vous vu avec votre équipe ce que vous pouviez réaliser?
Bien sincèrement

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDMzMjctd2h5LXVzZS1hLWhyZWYtdG8tYWRkLXRvLWNhcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86291
- Thank you received: 14269
-
-

4 years 10 months ago [\#337759](#337759) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Why use "a href" to add to cart?](/forum/26-product-category-display/903327-why-use-a-href-to-add-to-cart#337759 "Why use &quot;a href&quot; to add to cart, and not the  or  functions? Indeed, the SEO impact is greatly impacted. thank you for your reply")*

Bonjour,

Oui. Lousyfool a également raison que ça a du sens d'utiliser des tags "a" et je comprends l'idée d'utiliser des boutons également.
L'un ou l'autre je pense que cela ne change pas grand chose niveau SEO.
Mais bon, la modification n'est pas trop trop complexe, donc nous avons décidé de rajouter une option dans la configuration pour pouvoir choisir d'utiliser des a ou des input type="button". En plus, cela passe par un layout de vue maintenant, donc il sera facil de les personnaliser d'un coup au besoin.
Ce sera dans la prochaine version d'HikaShop, a paraître bientôt.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDMzMjctd2h5LXVzZS1hLWhyZWYtdG8tYWRkLXRvLWNhcnQ/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.224 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
