Jump to content

Blockwishlist problem (addJsDef)

Recommended Posts

I have some problems with blockwishlist. It is not supplied with the last versions, but I still have it from older versions. I am using now.


The module still works partially. When you click it nothing seems to happen. But when you click on your user account and there on the wishlist you see that your product has been added. Looking in the javascript debugger I found an error in line 63 of ajax-wishlist.js: "isLogged is not defined" in the sentence "if (isLogged == true) ". This is a check that the user is logged in.


Searching the cause I arrived at the file blockwishlist_top.tpl. Part of it looks as follows

{if $logged}
	{addJsDef isLoggedWishlist=true}
	{addJsDef isLoggedWishlist=false}

Problem was that I couldn't find the code back in my source. Code around this text is reproduced in the source code, but the function addJsDef just didn't produce any output. Searching on internet I found that I should switch on the option that the javascript code should be moved down. That solved the problem - but only on my localhost. There I could now see the created javascript declarations in the source code. I still had to add code for isLogged ( {addJsDef isLogged=true}) but then the js error disappeared and I got a popup when I wasn't logged in.


Unfortunately on my server - that has almost exactly the same files and configuration - this doesn't work: addJsDef still doesn't produce any output when the javascript is moved..


I use version 1.2.3 of BlockWishlist. I got the latest version (1.3.1) from Github but that had the same problem.


Does anyone have a solution?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More