- Posts: 40
- Thank you received: 0
Wishlist access from product listing doesn´t work
I have a problem with the wishlist. If I click to the "add to wishlist button" from main page (product listing) I get the reached limit message and the wishlist doesn´t appear. If I do the same thing from product details it works fine. I set the maximum quantity for each product to one in backend and modified the wishlist (cart/showcart). Even when I set the showcart to default the problem still is being there. Website: www.mydinx.com .
Please Log in or Create an account to join the conversation.
The wishlist must not be concerned by the limits. There are checks on that, but it seems that one of them were missing.
I have corrected it on my end.
You have to edit the file "administrator/components/com_hikashop/classes/cart.php" in the function "loadFullCart()" add the code:
Please Log in or Create an account to join the conversation.
I set wishlist to default and modified cart.php. The problem is still there. I the attachment you can see what I modified.
Please log in or register to see it.
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.
Could you give me a link to your website, and a backend access ?
Thanks for the backend access.
I need the FTP to debug your problem, I can't reproduce it on my end.
And the config access.
PS: You can use the pm button.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Thank you for help me. I`m missing the wishlist. When I push the "add to wishlist button" as registred user or guest nothing happens. There should come the wishlist for registred users and a message like "login first" for guests when pushing the botton. Can you explain me how to solve this please?
Best Regards
Please Log in or Create an account to join the conversation.
I tried again on your website, and when clicking on the "add to wishlist button" the product is added to the wishlist.
Then clicking on the show wishlist button (bottom left of your website) it redirect me to the wishlist listing.
I don't see any problem here.
To hide the wishlist to the users, you can use the option "Hide wishlist button for guest users" in Config > Features > Wishlists.
Please Log in or Create an account to join the conversation.
Sorry I forgot that position. I was just for testing. I`m not sure if I explained right before about the add to wishlist button. This is not what I wanted to ask you. I mean the function of the add to wishlist button. The button ever has to be visible. There I just need that a "login first message" appears when a non registred user pushs the button.
I still have problems with the wishlist. If I eliminate all products from hikashop wishlist I get a white screen. When I push the browsers Back-button after getting the white screen I get a login first message and I can´t add more products.
Please Log in or Create an account to join the conversation.
You can create a plugin based on the function "onBeforeCartUpdate()" and id the cart type is "wishlist" and the user is not logged in, so you don't add anything in the wishlist, display a message (Joomla enqueue message, or popup, or redirect to custom page) and then redirect back the customer to the product listing.
www.hikashop.com/fr/support/documentatio...umentation.html#cart
For the white page, it seems that a 500 error is returned, can you enable the Joomla debug mode and set the error reporting to "maximum" ?
Please Log in or Create an account to join the conversation.
I tried to understand how to create a plugin. But this is really too heavy for me. Isn´t it possible to modify the cart/showcart.php? I have seen that there is some code in the top area under the line $app = JFactory::getApplication();. Is it possible to add the function that if user is not logged in he gets directed to register page? I was looking for the right code but could`t make it work.
I turned on the debug mode and following message appears:
Notice: Undefined variable: conf in /var/www/vhosts/mydinx.com/httpdocs/components/com_hikashop/controllers/product.php on line 389 Fatal error: Call to a member function get() on a non-object in /var/www/vhosts/mydinx.com/httpdocs/components/com_hikashop/controll
Please log in or register to see it.
ers/product.php on line 389
Please Log in or Create an account to join the conversation.
You can edit the view "product / quantity" and for the add to wishlist, you can replace the action/url if the user is not logged in.
To check if the user is logged in or not, you can use the code:
Please Log in or Create an account to join the conversation.
I`m getting error message: Parse error: syntax error, unexpected 'else' (T_ELSE)
If I do it without "else{" I get the message: Parse error: syntax error, unexpected end of file
I attached the file. Can you tell me please how to solve this? Thank you.
Please log in or register to see it.
Best Regards,
Wolfgang
Please Log in or Create an account to join the conversation.
You have wrongly edited this file, many "}" were missing..
Thanks to try with that code:
Please Log in or Create an account to join the conversation.
Thank you for your fast reply. I tried the code. Now I get following message:
Parse error: syntax error, unexpected $end in ...../html/com_hikashop/product/quantity.php on line 1
Please Log in or Create an account to join the conversation.
See if it's working fine, and try to add again your changes without forget some "}"
Please Log in or Create an account to join the conversation.
This is why I included:
if(hikashop_loadUser() != null){
// display the button
}
It worked before but now it doesn´t take effect any more. You can see it too in the code you send me.
Please Log in or Create an account to join the conversation.
But instead of:
Please Log in or Create an account to join the conversation.
echo "<input class='hikashop_cart_button' type='button' value='".JText::_('ADD_TO_WISHLIST').....;
Please Log in or Create an account to join the conversation.