Carts are displayed instead of Wishlists
Hikashop 2.0.0
I had the wishlists and carts working properly and I'm not sure when ( we did 2 updates since then and installed Hikamarket ) they stopped working properly.
Currently, if I go to:
http://localhost/made/index.php?option=com_hikashop&ctrl=cart&task=showcarts&cart_type=wishlist&Itemid=512&lang=es
It will show CARTS, not WISHLISTS. --> Note that the cart_type var is specifying "wishlist".
I checked the code and, on line #279 of front_End../views/cart/view.html.php I see the following code.
I thought the order is causing HS to always set the cart type to "cart". I changed the order of the to IFs to:
This worked and I was able to get my carts and wishlist displaying according to the cart_type specified.
Q: is this the correct thing to do to get it fixed?
Eduardo Chongkan - Likan Development
likandevelopment.com
Please Log in or Create an account to join the conversation.
Thanks for the report.
You should better use this correction:
Please Log in or Create an account to join the conversation.
Fatal error: Can't use method return value in write context in ..components/com_hikashop/views/cart/view.html.php on line 281
Eduardo Chongkan - Likan Development
likandevelopment.com
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I ended up using my code, not Xavier's because I didn't have time that day to wait for the fix, since it worked I didn't test Xavier's last suggestion.
What code are you using?
Eduardo Chongkan - Likan Development
likandevelopment.com
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
this is how the code looks in the site:
$menu = $menus->getItem($Itemid);
}
}
if(empty($cart_type)){
if (is_object( $menu )) {
$cart_type = $menu->params->get('cart_type');
}
if(!empty($cart_type){
JRequest::setVar('cart_type',$cart_type);
}else{
$cart_type = JRequest::getString('cart_type','cart');
}
}
$pageInfo = new stdClass();
$pageInfo->filter = new stdClass();
$pageInfo
Please Log in or Create an account to join the conversation.
Use this code: (Xavier's)
I also recommend you to use a good IDE or editor, one that points syntax errors.
I use Aptana, but I think Notepad++ also works.
Eduardo Chongkan - Likan Development
likandevelopment.com
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Thanks to wait for it, and then tell us if the problem is solved.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.