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

#   Need another one button "add to cart and go to the cart"

##

- **[progreccor](/forum/user/4816-progreccor "View progreccor's Profile")**
- [![progreccor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4816.jpg)](/forum/user/4816-progreccor "View progreccor's Profile") Topic Author
- [ Offline](/forum/user/4816-progreccor "Москва")
- SEO, webdesign

Less More

- Posts: 2293
- Thank you received: 314
-
-
-
- [](http://www.d-dd.ru)
-

8 years 10 months ago [\#284653](#284653) by [progreccor](/forum/user/4816-progreccor "View progreccor's Profile")  *[Need another one button "add to cart and go to the cart"](/forum/31-development/893222-need-another-one-button-add-to-cart-and-go-to-the-cart#284653 "-- HikaShop version -- : 3.2.1  I need to create two buttons &quot;add to cart&quot; on the product page.  1. Traditional add to cart that is work well. 2. And &quot;Add to cart and go to the cart&quot;  The second button need to add to the cart current product and after that go to the cart,  What is the optimal way for this?")* was created by *[progreccor](/forum/user/4816-progreccor "View progreccor's Profile")*

-- HikaShop version -- : 3.2.1

I need to create two buttons "add to cart" on the product page.

1. Traditional add to cart that is work well.
2. And "Add to cart and go to the cart"

The second button need to add to the cart current product and after that go to the cart,

What is the optimal way for this?

---

Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5MzIyMi1uZWVkLWFub3RoZXItb25lLWJ1dHRvbi1hZGQtdG8tY2FydC1hbmQtZ28tdG8tdGhlLWNhcnQ/dG1wbD1tYXJrZG93bg==) 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
-
-
-

8 years 10 months ago [\#284660](#284660) 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 *[Need another one button "add to cart and go to the cart"](/forum/31-development/893222-need-another-one-button-add-to-cart-and-go-to-the-cart#284660 "-- HikaShop version -- : 3.2.1  I need to create two buttons &quot;add to cart&quot; on the product page.  1. Traditional add to cart that is work well. 2. And &quot;Add to cart and go to the cart&quot;  The second button need to add to the cart current product and after that go to the cart,  What is the optimal way for this?")*

Hello,

The solution will be to directly use some views override for the "Add to cart and go to the cart" button and use a link like the link that you can find when using the "Add to cart HTML link" option through your product configuration page.

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

- **[progreccor](/forum/user/4816-progreccor "View progreccor's Profile")**
- [![progreccor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4816.jpg)](/forum/user/4816-progreccor "View progreccor's Profile") Topic Author
- [ Offline](/forum/user/4816-progreccor "Москва")
- SEO, webdesign

Less More

- Posts: 2293
- Thank you received: 314
-
-
-
- [](http://www.d-dd.ru)
-

8 years 10 months ago [\#284710](#284710) by [progreccor](/forum/user/4816-progreccor "View progreccor's Profile")  Replied by *[progreccor](/forum/user/4816-progreccor "View progreccor's Profile")* on topic *[Need another one button "add to cart and go to the cart"](/forum/31-development/893222-need-another-one-button-add-to-cart-and-go-to-the-cart#284710 "-- HikaShop version -- : 3.2.1  I need to create two buttons &quot;add to cart&quot; on the product page.  1. Traditional add to cart that is work well. 2. And &quot;Add to cart and go to the cart&quot;  The second button need to add to the cart current product and after that go to the cart,  What is the optimal way for this?")*

I got this code Code:

&lt;a class="hikashop_html_add_to_cart_link" href="https://shop.elino.ru/vetchina/vetchina-lopatochnaya-beef-on"&gt;В корзину&lt;/a&gt;

But it doesn't work .... Don't add to cart any product....
[ ![2017-12-19&#95;09-50-31.jpg](/forum/attachment/41872) ](/forum/attachment/41872 "...9&#95;09-50-31.jpg")

---

Я не явлюсь официальной службой поддержки!
Я здесь добровольно!

Хочешь получить купон на скидку Hikashop? Спроси меня как!

- [ ![2017-12-19&#95;09-50-31.jpg](/forum/attachment/41872) ](/forum/attachment/41872 "...9&#95;09-50-31.jpg") [ ](/forum/attachment/41872?download=1 "...9&#95;09-50-31.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg5MzIyMi1uZWVkLWFub3RoZXItb25lLWJ1dHRvbi1hZGQtdG8tY2FydC1hbmQtZ28tdG8tdGhlLWNhcnQ/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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86541
- Thank you received: 14304
-
-

8 years 10 months ago -  8 years 10 months ago [\#284712](#284712) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Need another one button "add to cart and go to the cart"](/forum/31-development/893222-need-another-one-button-add-to-cart-and-go-to-the-cart#284712 "-- HikaShop version -- : 3.2.1  I need to create two buttons &quot;add to cart&quot; on the product page.  1. Traditional add to cart that is work well. 2. And &quot;Add to cart and go to the cart&quot;  The second button need to add to the cart current product and after that go to the cart,  What is the optimal way for this?")*

Hi,

It's actually a bug of that popup when the canonical URL of the product is filled.
Change the code: Code:

echo '&lt;textarea style="width:100%" rows="5"&gt;&lt;a class="hikashop_html_add_to_cart_link" href="'. hikashop_contentLink('product&amp;task=updatecart&amp;qty=1&amp;cid='.$product_id, $product, false, false, false, true).'"&gt;'.JText::_('ADD_TO_CART').'&lt;/a&gt;&lt;/textarea&gt;';

to: Code:

$menusClass = hikashop_get('class.menus'); $id = $menusClass-&gt;loadAMenuItemId('',''); if(!empty($id)) $id = '&amp;Itemid='.$id; echo '&lt;textarea style="width:100%" rows="5"&gt;&lt;a class="hikashop_html_add_to_cart_link" href="'. hikashop_completeLink('product&amp;task=updatecart&amp;qty=1&amp;cid='.$product_id.$id, false, false, false, true).'"&gt;'.JText::_('ADD_TO_CART').'&lt;/a&gt;&lt;/textarea&gt;';

in the file administrator/components/com_hikashop/controllers/product.php and it will then provide a correct link in the HTML of the popup.
We'll add that patch for the next version of HikaShop which is to be released soon.

Last edit: 8 years 10 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

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

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