Skip to main content

Message after adding to wishlist wrong

12 years 5 months ago #159914 by Xavier
Hi,

I have reproduced the issue on my end and correct it. Thanks for the report.
To make it working, thanks to edit the file "components/com_hikashop/controllers/cart.php" and replace the function "delete()" by:
Code:
function delete(){ //delete a cart with the id given $cart_id = JRequest::getInt('cart_id','0'); $cart_type = JRequest::getString('cart_type','cart'); $cartClass = hikashop_get('class.cart'); $cartClass->cart_type = $cart_type; $cartInfo = $cartClass->loadCart($cart_id); $currUser = hikashop_loadUser(true); if($cartInfo != null && $currUser->user_cms_id == $cartInfo->user_id){ $app = JFactory::getApplication(); if($app->getUserState(HIKASHOP_COMPONENT.'.'.$cart_type.'_id') == $cart_id){ $app->setUserState(HIKASHOP_COMPONENT.'.'.$cart_type.'_id', '0'); } $cartClass->delete($cart_id, 'old'); } $this->showcarts(); }
The following user(s) said Thank You: mohairbears

Please Log in or Create an account to join the conversation.

12 years 5 months ago - 12 years 5 months ago #161358 by mohairbears
Hi I have had to re-install after issues with your new release and now have this problem back again, as you did not put here how you fixed it can you advise so I can do this myself. (the wishlist issue)

thanks
Last edit: 12 years 5 months ago by mohairbears.

Please Log in or Create an account to join the conversation.

12 years 5 months ago #161361 by Xavier
Hi,

as you did not put here how you fixed it

The topic:
hikashop.com/forum/wishlist/868648-messa...-wrong.html?start=20 #159914

Was actually explaining how to solve the issue ;) So you just have to:

edit the file "components/com_hikashop/controllers/cart.php" and replace the function "delete()" by:

the code given in the previous post.

Please Log in or Create an account to join the conversation.

12 years 5 months ago #161516 by mohairbears
Hi, Sorry but there is 2 errors here, The 'delete' now works thanks to your code it is the 'wishlist' error further up the post that has got broken again after you fixed it by going in to my back end (pardon the pun)

thanks

Please Log in or Create an account to join the conversation.

12 years 5 months ago #161545 by Xavier
Hi,

Sorry, the other modification was to replace the function "notice()" in "components/com_hikashop/views/checkout/view.html.php" by:
Code:
function notice() { global $Itemid; $url_itemid=''; if(!empty($Itemid)) { $url_itemid='&Itemid='.$Itemid; } jimport('joomla.html.parameter'); $class = hikashop_get('helper.cart'); $this->assignRef('url_itemid',$url_itemid); $this->assignRef('cartClass',$class); $config =& hikashop_config(); $this->assignRef('config',$config); $cart_type = JRequest::getVar('cart_type',''); if(!empty($cart_type)){ $app = JFactory::getApplication(); $app->setUserState(HIKASHOP_COMPONENT.'.popup_cart_type',$cart_type); } }
The following user(s) said Thank You: mohairbears

Please Log in or Create an account to join the conversation.

Time to create page: 0.065 seconds
Powered by Kunena Forum