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

#   Edit button Add to cart HTML link code

##

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

Less More

- Posts: 431
- Thank you received: 22
-

11 years 5 months ago [\#201775](#201775) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#201775 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")* was created by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1

How or where to edit code, which i get with Add to cart html link button in product part.

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

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

11 years 5 months ago [\#201862](#201862) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#201862 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")*

Hello,
Can you tell me what do you exactly want to change on the Add to cart html link button so that I can give you more information on how to do it ?
Thanks.

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

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

Less More

- Posts: 431
- Thank you received: 22
-

11 years 5 months ago [\#201892](#201892) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#201892 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")*

When i click "Add to cart HTML link" button, i get this code showing in popup
Code:

&lt;a class="hikashop_html_add_to_cart_link" href="http://www.shop.com/index.php?option=com_hikashop&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;checkout=1&amp;product_id=5"&gt;Add to cart&lt;/a&gt;

I want to customize that code. More precise, i want to add class btn-red. So admin dont need to change it every time.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 5 months ago [\#201895](#201895) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#201895 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")*

Hi,

For the moment the generated code is directly in the HikaShop product controller.
So if you want to change that, you will need to modify the file (which is a core file so you will loose your modification next time you will update HikaShop).

File : administrator/components/com_hikashop/controllers/product.php
Code to edit Code:

function updatecart(){ echo '&lt;textarea style="width:100%" rows="5"&gt;&lt;a class="hikashop_html_add_to_cart_link" href="'.HIKASHOP_LIVE.'index.php?option='.HIKASHOP_COMPONENT.'&amp;ctrl=product&amp;task=updatecart&amp;quantity=1&amp;checkout=1&amp;product_id='.JRequest::getInt('cid').'"&gt;'.JText::_('ADD_TO_CART').'&lt;/a&gt;&lt;/textarea&gt;'; }

This "update cart link" should be improved in the future but I can't say more for the moment.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

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

Less More

- Posts: 431
- Thank you received: 22
-

11 years 5 months ago [\#201941](#201941) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#201941 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")*

Thank you. This will do for the moment.

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

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

Less More

- Posts: 28
- Thank you received: 0
-
-

10 years 11 months ago [\#221796](#221796) by [AntinJH](/forum/user/39561-antinjh "View AntinJH's Profile")  Replied by *[AntinJH](/forum/user/39561-antinjh "View AntinJH's Profile")* on topic *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#221796 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")*

Hi there !

This is exactely the answer to my question, but you posted this 6 month ago... Is there any new method or do I still have to modify the core file ?

Thanks.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3Njk3MS1lZGl0LWJ1dHRvbi1hZGQtdG8tY2FydC1odG1sLWxpbmstY29kZT90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

10 years 11 months ago [\#221800](#221800) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#221800 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")*

Hi,

It's still the same for now.

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

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

Less More

- Posts: 431
- Thank you received: 22
-

3 years 10 months ago [\#347605](#347605) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#347605 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")*

After all years, any news on that?
I need to do some changes to that link and I think that others to.
Can at least be added rel="nofollow"?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3Njk3MS1lZGl0LWJ1dHRvbi1hZGQtdG8tY2FydC1odG1sLWxpbmstY29kZT90bXBsPW1hcmtkb3du) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86293
- Thank you received: 14271
-
-

3 years 10 months ago [\#347608](#347608) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#347608 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")*

Hi,

Indeed, this seems to have been lost.
I suppose that's because now people usually use the content tag mechanism ( [ www.hikashop.com/support/documentation/1...-product-insert.html](https://www.hikashop.com/support/documentation/137-hikashop-product-insert.html) ) which provides more functions like ajax add to cart, notification box, cart module refresh, etc like a normal HikaShop add to cart button while this uses the fallback add to cart mechanism.
We'll look into adding a view file for this for the next version so that you can easily change that with an override instead of that core file modification. It's an easy change so why not.

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

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

Less More

- Posts: 431
- Thank you received: 22
-

3 years 10 months ago [\#347627](#347627) by [mojweb](/forum/user/5128-mojweb "View mojweb's Profile")  Replied by *[mojweb](/forum/user/5128-mojweb "View mojweb's Profile")* on topic *[Edit button Add to cart HTML link code](/forum/4-how-to/876971-edit-button-add-to-cart-html-link-code#347627 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1  How or where to edit code, which i get with Add to cart html link button in product part.")*

We use this link in product descriptions. To insert second add to cart button at the end of the long description.
Thank you.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzg3Njk3MS1lZGl0LWJ1dHRvbi1hZGQtdG8tY2FydC1odG1sLWxpbmstY29kZT90bXBsPW1hcmtkb3du) 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.157 seconds

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

[](#top)
