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

#   Convert cart to wishlist

##

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

Less More

- Posts: 6
- Thank you received: 0
-
-

11 years 8 months ago -  11 years 8 months ago [\#190413](#190413) by [Ducnb](/forum/user/34054-ducnb "View Ducnb's Profile")  *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#190413 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")* was created by *[Ducnb](/forum/user/34054-ducnb "View Ducnb's Profile")*

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1

I want have function will convert alll products in cart to wishlist.
Current, I only can convert wishlist to cart.

when order, I see have the button call "Convert cart in wishlist", but when I click on it, it show blank page, dont have any products in this page.

[ ![7377703.png](/forum/attachment/22325) ](/forum/attachment/22325 "7377703.png")

I try fix this error and I see this code (**components/com\_hikashop/controllers/cart.php**): Code:

function convert(){ $app = JFactory::getApplication(); $cart_type = JRequest::getString('cart_type','cart'); $cart_id = JRequest::getInt('cart_id','0'); $cartClass = hikashop_get('class.cart'); $cartInfo = $cartClass-&gt;loadCart($cart_id); $currUser = hikashop_loadUser(true); if($cartInfo != null &amp;&amp; $currUser-&gt;user_cms_id == $cartInfo-&gt;user_id){ $app-&gt;setUserState(HIKASHOP_COMPONENT.'.'.$cart_type.'_id', 0); $cartClass-&gt;convert($cart_id, $cart_type); if($cart_type != 'wishlist'){ JRequest::setVar('cart_type','wishlist'); } } JRequest::setVar('cart_id',$cart_id); JRequest::setVar('layout', 'showcart'); return parent::display(); }

When I change Code:

$app-&gt;setUserState(HIKASHOP_COMPONENT.'.'.$cart_type.'_id', 0);

to Code:

$app-&gt;setUserState(HIKASHOP_COMPONENT.'.'.$cart_type.'_id', $cart_id);

it's work, it will convert all product in cart to wishlist. and set empty cart.
but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.

Thanks.

- [ ![7377703.png](/forum/attachment/22325) ](/forum/attachment/22325 "7377703.png") [ ](/forum/attachment/22325?download=1 "7377703.png")

Last edit: 11 years 8 months ago by [Ducnb](/forum/user/34054-ducnb "View Ducnb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQxLXdpc2hsaXN0Lzg3NDkzMC1jb252ZXJ0LWNhcnQtdG8td2lzaGxpc3Q/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 8 months ago [\#190433](#190433) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#190433 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")*

Hi,

Please try to update to HikaShop 2.3.5, few changes have been made on the cart and wishlist.
If it is still not working on the latest version, you can apply your patch, and keep us informed in order to do deeper check.

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

11 years 6 months ago [\#197071](#197071) by [ShinKou](/forum/user/35683-shinkou "View ShinKou's Profile")  Replied by *[ShinKou](/forum/user/35683-shinkou "View ShinKou's Profile")* on topic *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#197071 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")*

-- HikaShop version -- : 2.3.5 Business
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : 41.0.2272.101 m

I am having a similar problem but when I click on "convert cart in wishlist" the page shows "you are not authorized to see this page" even though I am registered and logged in during checkout. I have to click on "display my carts" button to see the item added. Is there a way that the page displays correctly, instead of showing "you are not authorized to see this page"?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQxLXdpc2hsaXN0Lzg3NDkzMC1jb252ZXJ0LWNhcnQtdG8td2lzaGxpc3Q/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 6 months ago [\#197083](#197083) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#197083 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")*

Hi,

There is fixes done in the latest version of HikaShop for that kind of issues, so please download and install the latest version.

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

11 years 6 months ago [\#197731](#197731) by [ShinKou](/forum/user/35683-shinkou "View ShinKou's Profile")  Replied by *[ShinKou](/forum/user/35683-shinkou "View ShinKou's Profile")* on topic *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#197731 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")*

My order was made on 2015-01-09 is there a more recent version than this?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQxLXdpc2hsaXN0Lzg3NDkzMC1jb252ZXJ0LWNhcnQtdG8td2lzaGxpc3Q/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 6 months ago [\#197735](#197735) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#197735 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")*

Hi,

The current version is the 2.4.0

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

11 years 6 months ago [\#198071](#198071) by [ShinKou](/forum/user/35683-shinkou "View ShinKou's Profile")  Replied by *[ShinKou](/forum/user/35683-shinkou "View ShinKou's Profile")* on topic *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#198071 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")*

I updated to the latest version 2.4.0, but the "You are not authorized to see this resource" still remains.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQxLXdpc2hsaXN0Lzg3NDkzMC1jb252ZXJ0LWNhcnQtdG8td2lzaGxpc3Q/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 6 months ago [\#198335](#198335) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#198335 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")*

Hi,

I don't have the message displayed when testing on you website.
Do you have edited anything ?

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

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

Less More

- Posts: 6
- Thank you received: 0
-
-

11 years 6 months ago [\#198502](#198502) by [ShinKou](/forum/user/35683-shinkou "View ShinKou's Profile")  Replied by *[ShinKou](/forum/user/35683-shinkou "View ShinKou's Profile")* on topic *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#198502 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")*

No I haven't edited anything. I am wondering would it have something to do with caching?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQxLXdpc2hsaXN0Lzg3NDkzMC1jb252ZXJ0LWNhcnQtdG8td2lzaGxpc3Q/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 6 months ago [\#198505](#198505) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Convert cart to wishlist](/forum/41-wishlist/874930-convert-cart-to-wishlist#198505 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : LinuxMint 17.1 FireFox 35.0.1  I want have function will convert alll products in cart to wishlist. Current, I only can convert wishlist to cart.  when order, I see have the button call &quot;Convert cart in wishlist&quot;, but when I click on it, it show blank page, dont have any products in this page.  I try fix this error and I see this code (components/com&#95;hikashop/controllers/cart.php):  When I change  to  it's work, it will convert all product in cart to wishlist. and set empty cart. but will have problem when I upgrade. Please let me know other solution, add all products in cart to wishlist but not empty cart.  Thanks.")*

Hi,

Yes indeed, I forgot to ask you that. If you have any cache, please disable it (Joomla settings, Joomla plugin, template cache...)

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

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

[](#top)
