- Posts: 51
- Thank you received: 0
Adding to wishlist from Product listing
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.5
Hi
I dont seem to be able to add to the wishlist (favourites) from the product listing page but clicking through to the product item I can add to wishlist there - am wanting to omit the extra step.
Any ideas?
Please Log in or Create an account to join the conversation.
Hard to tell, can you provide an Url link in order to see it by ourself ? Some Screenshot of your Item Menu Configuration can be useful to.
Note : You can provide these elements if needed thanks to our Contact us form, just don't forget to add an Url link to this topic.
Awaiting news from you.
Regards
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
If you switch the state of the option "Use AJAX when possible for add to cart buttons" in Configuration > Main > Advanced settings, does that solve the issue ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I thought this had solved the problem but unfortunately it hasn't entirely fixed it!
On visiting this url 185.123.96.101/~ewga9996/index.php/glassware I click "add to favourites" on any product and the popup appears saying it's been successfully added to the cart - however I'm not logged in!
If I then click on another "Add to favourites" button the popup appears telling me I must be logged in to "add to favourites".
I also noticed that after the first click "?popup=1" gets appended to the URL.
Would you mind checking this out as this doesn't seem to work correctly!
Thanks
Please Log in or Create an account to join the conversation.
Do you have some override views ? And especially, in product/listing_div view because, the first thing that is strange is that by default in HikaShop, If you're not logged, "Add to Whishlist" (Add to favorite in your case) button won't be display.
If you have some override (save and keep the file aside) can you try to remove it, and see if that solve your last issue ?
Note : To check your override view :
- Go to Components => HikaShop => Configuration
- On Display dropdown select Views
- Use the three filter dropdown to find your view product, in your front-end template
To learn more about override system, check this tutorial, here
Awaiting news from you.
Regards
Please Log in or Create an account to join the conversation.
Thanks for the reply. I initially thought the overrides could be the problem once you had pointed it out however I have deleted all the template overrides and customisation, used the default protostar template and reinstalled Hikashop but the issue still remains where the "Add to Wishlist" button appears if you are not logged in, on first click appears to add the item to the cart then on subsequent clicks you are told "you must be logged in to add items to the wishlist".
Any further help would be much appreciated!
Please Log in or Create an account to join the conversation.
I was able to reproduce the issue.
in media/com_hikashop/js/hikashop.js
Try changing the code
in the file "quantity" of the view "product" via the menu display>Views.
Replace :
Please Log in or Create an account to join the conversation.
Where do I find this code? - couldn't find it in
media/com_hikashop/js/hikashop.js
or
in the file "quantity" of the view "product" via the menu display>Views.
nicolas wrote: and the code:
toCode:$formName = ',hikashop_product_form'; $cleanFormName = str_replace(array('\'',','),'',$formName); $wishlistAjax = 'if(hikashopCheckChangeForm(\'item\''.$formName.')){ var typeField = document.querySelector(\'form[name='.$cleanFormName.'] input[name=cart_type]\'); if(typeField !== null){typeField.value = \'wishlist\';} return hikashopModifyQuantity(\'' . (int)@$this->row->product_id . '\',field,1' . $formName . ',\'wishlist\','.$module_id.'); } else { return false; }';Code:$formName = ',\'hikashop_product_form\''; $cleanFormName = str_replace(array('\'',','),'',$formName); $module_id = $this->params->get('from_module', 0); $wishlistAjax = 'if(hikashopCheckChangeForm(\'item\',this)){ var typeField = document.getElementById(\'hikashop_cart_type_'.$this->row->product_id.'_'.$module_id.'\'); if(!typeField){typeField = document.getElementById(\'cart_type\'); } if(typeField){typeField.value = \'wishlist\'; console.log(typeField); } return hikashopModifyQuantity(\'' . (int)@$this->row->product_id . '\',field,1' . $formName . ',\'wishlist\','.$module_id.'); } else { return false; }';
Please Log in or Create an account to join the conversation.
Please re-read the Nicolas' message ; I made it a little more explicit about the files.
Regards;
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I found the code but I still can't find this bit in that file
Please Log in or Create an account to join the conversation.
I am afraid that I don't understand your message.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
nicolas wrote: and the code:
toCode:$formName = ',hikashop_product_form'; $cleanFormName = str_replace(array('\'',','),'',$formName); $wishlistAjax = 'if(hikashopCheckChangeForm(\'item\''.$formName.')){ var typeField = document.querySelector(\'form[name='.$cleanFormName.'] input[name=cart_type]\'); if(typeField !== null){typeField.value = \'wishlist\';} return hikashopModifyQuantity(\'' . (int)@$this->row->product_id . '\',field,1' . $formName . ',\'wishlist\','.$module_id.'); } else { return false; }';Code:$formName = ',\'hikashop_product_form\''; $cleanFormName = str_replace(array('\'',','),'',$formName); $module_id = $this->params->get('from_module', 0); $wishlistAjax = 'if(hikashopCheckChangeForm(\'item\',this)){ var typeField = document.getElementById(\'hikashop_cart_type_'.$this->row->product_id.'_'.$module_id.'\'); if(!typeField){typeField = document.getElementById(\'cart_type\'); } if(typeField){typeField.value = \'wishlist\'; console.log(typeField); } return hikashopModifyQuantity(\'' . (int)@$this->row->product_id . '\',field,1' . $formName . ',\'wishlist\','.$module_id.'); } else { return false; }';
I found this code to be able to replace
but I wasn't able to find this code in the file
Please Log in or Create an account to join the conversation.
That's quite strange, this line have to be there, and especially if your on HikaShop 2.6.3.
See this screenshot :
So, I suggest you to add this missing line, more precisely (if I use your code), remove this :
Hope that's will help you.
Regards
Please Log in or Create an account to join the conversation.
I found that the quantity.php file was from hikashop 2.6.1 - must have been an override still there from when I updated to 2.6.3 which is why I couldn't find the code!
Anyhow - I decided to take a backup - update all the software locally - so am now on joomla 3.6.2 and hikashop 2.6.4 - I'm also using the protostar default template with no overrides or customisation and the issue still exists.
Any help greatly appreciated - Thanks
Please Log in or Create an account to join the conversation.
I've checked your website and I don't see the modifications that I talked about in www.hikashop.com/forum/wishlist/885431-a...-listing.html#248780
Cna you please make sure that you made these changes ?
Please Log in or Create an account to join the conversation.
I did the changes locally and have now uploaded them here
185.123.96.101/~ewga9996/test/index.php/glassware
Thanks
Please Log in or Create an account to join the conversation.
I wanted to look at the issue but I'm not receiving the activation link for the user account I had to create to be able to test the wishlist.
Could you activate the account ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.