Message after adding to wishlist wrong
12 years 5 months ago #159914
by Xavier
Replied by Xavier on topic Message after adding to wishlist wrong
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:
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.
- mohairbears
-
Topic Author
- Offline
Less
More
- Posts: 611
- Thank you received: 13
12 years 5 months ago - 12 years 5 months ago #161358
by mohairbears
Replied by mohairbears on topic Message after adding to wishlist wrong
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
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
Replied by Xavier on topic Message after adding to wishlist wrong
Hi,
hikashop.com/forum/wishlist/868648-messa...-wrong.html?start=20 #159914
Was actually explaining how to solve the issue
So you just have to:
The topic:as you did not put here how you fixed it
hikashop.com/forum/wishlist/868648-messa...-wrong.html?start=20 #159914
Was actually explaining how to solve the issue
the code given in the previous post.edit the file "components/com_hikashop/controllers/cart.php" and replace the function "delete()" by:
Please Log in or Create an account to join the conversation.
- mohairbears
-
Topic Author
- Offline
Less
More
- Posts: 611
- Thank you received: 13
12 years 5 months ago #161516
by mohairbears
Replied by mohairbears on topic Message after adding to wishlist wrong
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
thanks
Please Log in or Create an account to join the conversation.
12 years 5 months ago #161545
by Xavier
Replied by Xavier on topic Message after adding to wishlist wrong
Hi,
Sorry, the other modification was to replace the function "notice()" in "components/com_hikashop/views/checkout/view.html.php" by:
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.079 seconds