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

#   Add to wishlist add also to cart

##

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

Less More

- Posts: 72
- Thank you received: 0
-
-

11 years 6 days ago [\#219799](#219799) by [mymall](/forum/user/36279-mymall "View mymall's Profile")  *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#219799 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")* was created by *[mymall](/forum/user/36279-mymall "View mymall's Profile")*

-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4

Dear Sir
I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart

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

Less More

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

11 years 6 days ago [\#219840](#219840) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#219840 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

Hi,

I tried to look at the problem on your website but I couldn't find a page with the add to wishlist button.
[ take.ms/Jjib9](http://take.ms/Jjib9)

Could you provide a link to such page so that we could have a look at the problem ?

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

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

Less More

- Posts: 72
- Thank you received: 0
-
-

11 years 6 days ago [\#219847](#219847) by [mymall](/forum/user/36279-mymall "View mymall's Profile")  Replied by *[mymall](/forum/user/36279-mymall "View mymall's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#219847 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

Dear Sir
you need to login
please use user amjad, pass 1234
thanks

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

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

Less More

- Posts: 72
- Thank you received: 0
-
-

11 years 5 days ago [\#219981](#219981) by [mymall](/forum/user/36279-mymall "View mymall's Profile")  Replied by *[mymall](/forum/user/36279-mymall "View mymall's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#219981 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

Dear sir
did you had a chance to look at the problem
thanks

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 4 days ago [\#219959](#219959) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#219959 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

Hi,

Thanks for the report, there is indeed an issue.
Please edit the view "product / compare" and add the line: Code:

&lt;input type="hidden" name="cart_type" value="cart"/&gt;

Before: Code:

&lt;input type="hidden" name="return_url" value="&lt;?php echo urlencode(base64_encode(urldecode($this-&gt;redirect_url)));?&gt;"/&gt;

And then edit the view "product / quantity" and replace: Code:

$wishlistAjax = 'if(hikashopCheckChangeForm(\'item\''.$formName.')){ return hikashopModifyQuantity(\'' . (int)@$this-&gt;row-&gt;product_id . '\',field,1' . $formName . ',\'wishlist\','.$module_id.'); } else { return false; }';

By: Code:

$cleanFormName = str_replace(array('\'',','),'',$formName); $wishlistAjax = 'if(hikashopCheckChangeForm(\'item\''.$formName.')){ document.querySelector(\'form[name='.$cleanFormName.'] input[name=cart_type]\').value = \'wishlist\'; return hikashopModifyQuantity(\'' . (int)@$this-&gt;row-&gt;product_id . '\',field,1' . $formName . ',\'wishlist\','.$module_id.'); } else { return false; }';

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

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

Less More

- Posts: 72
- Thank you received: 0
-
-

11 years 4 days ago [\#220011](#220011) by [mymall](/forum/user/36279-mymall "View mymall's Profile")  Replied by *[mymall](/forum/user/36279-mymall "View mymall's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#220011 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

thanks for the feedback
this fix the problem in the compare page, however it looks it affect the product page add to wish list, if I hit, nothing happened, no product added to wish list from product page

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 4 days ago [\#220016](#220016) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#220016 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

Hi,

Please try this code instead: Code:

$cleanFormName = str_replace(array('\'',','),'',$formName); $wishlistAjax = 'if(hikashopCheckChangeForm(\'item\''.$formName.')){ var typeField = document.querySelector(\'form[name='.$cleanFormName.'] input[name=cart_type]\'); if(typeField !== null){typeField.value = \'wishlist\';} return hikashopModifyQuantity(\'' . (int)@$this-&gt;row-&gt;product_id . '\',field,1' . $formName . ',\'wishlist\','.$module_id.'); } else { return false; }';

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

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

Less More

- Posts: 72
- Thank you received: 0
-
-

11 years 4 days ago [\#220074](#220074) by [mymall](/forum/user/36279-mymall "View mymall's Profile")  Replied by *[mymall](/forum/user/36279-mymall "View mymall's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#220074 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

thanks for you support, this fix add to wish list in product page
however, in compare page and after I add the product to wish list, it automatically open the wish list page, I need to stay in the compare page
please advice

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 3 days ago [\#220081](#220081) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#220081 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

Hi,

This is due to the value of the option "After a product is added to the cart" in Configuration &gt; Main &gt; Cart.
Please try with another value like "Always stay on the same page".

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

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

Less More

- Posts: 72
- Thank you received: 0
-
-

11 years 3 days ago [\#220214](#220214) by [mymall](/forum/user/36279-mymall "View mymall's Profile")  Replied by *[mymall](/forum/user/36279-mymall "View mymall's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#220214 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

Dear Sir
this value already set to Always stay on the same page
please have in mind, when adding from Product page its stay in product page, but when adding to wish list from compare page it go to wish list

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

Less More

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

11 years 1 day ago [\#220408](#220408) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#220408 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

Hi,

Xavier won't be available until Monday. He'll answer you then as he is the one in charge of that area.

Thank you for bearing with us.

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

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 11 months ago [\#220683](#220683) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#220683 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

Hi,

Please edit the file "components/com_hikashop/controllers/product.php" and in the function "updatecart()" add: Code:

if(!isset($stay))

Right before: Code:

$stay = JRequest::getInt('stay',0);

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

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

Less More

- Posts: 72
- Thank you received: 0
-
-

10 years 11 months ago [\#220805](#220805) by [mymall](/forum/user/36279-mymall "View mymall's Profile")  Replied by *[mymall](/forum/user/36279-mymall "View mymall's Profile")* on topic *[Add to wishlist add also to cart](/forum/26-product-category-display/880324-add-to-wishlist-add-also-to-cart#220805 "-- HikaShop version -- : 2.6.0 -- Joomla version -- : 3.4.4  Dear Sir I have problem when adding to wish list (in compare results page only) , it add the product also to cart, the problem does not appear in product page where adding to wish list it did not add to cart")*

thanks this solve the problem

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

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