Jump to content
Sign in to follow this  
tmcca

Wishlist For Phoenix

Recommended Posts

Finally got this on a live site and now getting the below error on the first visit to the site.

Quote

Fatal error: Uncaught Error: Call to a member function count_contents() on null in /customers/2/b/b/360wargaming.com/httpd.www/includes/modules/navbar_modules/templates/tpl_nb_wish_list.php:3 
Stack trace: #0 /customers/2/b/b/360wargaming.com/httpd.www/includes/modules/block_template.php(14): include() 
#1 /customers/2/b/b/360wargaming.com/httpd.www/includes/modules/navbar_modules/nb_wish_list.php(52): include('/customers/2/b/...') 
#2 /customers/2/b/b/360wargaming.com/httpd.www/includes/modules/content/navigation/cm_navbar.php(60): nb_wish_list->getOutput() 
#3 /customers/2/b/b/360wargaming.com/httpd.www/includes/system/versioned/1.0.4.0/osc_template.php(146): cm_navbar->execute() 
#4 /customers/2/b/b/360wargaming.com/httpd.www/includes/template_top.php(45): oscTemplate->getContent('navigation') 
#5 /customers/2/b/b/360wargaming.com/httpd.www/index.php(35): require('/customers/2/b/...') 
#6 {main} thrown in /customers/2/b/b/360wargaming.com/httpd.www/includes/modules/navbar_modules/templates/tpl_nb_wish_list.php on line 3 

Any ideas? Or can I just suppress it?

Share this post


Link to post
Share on other sites

global $cart

in the relevant navbar module.

That may lead to other problems or it may fix it.


Help shape the future of Phoenix; join the Phoenix Club

Share this post


Link to post
Share on other sites
Posted (edited)
14 minutes ago, burt said:

That may lead to other problems or it may fix it.

Did neither, I'll carry on looking though.

The wishlist addon has its class file that contains it's own count_contents function.

 

Edited by LeeFoster

Share this post


Link to post
Share on other sites

When you make wishlist into a hook, I am curious how you ensure the wishlist action is executed before the shopping cart action. This order of execution is important as you do not want shopping cart to act first leaving nothing for the wishlist.

Share this post


Link to post
Share on other sites
20 minutes ago, kgtee said:

When you make wishlist into a hook, I am curious how you ensure the wishlist action is executed before the shopping cart action. This order of execution is important as you do not want shopping cart to act first leaving nothing for the wishlist.

Put it in the hook before the shopping cart action is processed? 

This will be a little more complicated in 1.0.7.4, as the shopping cart actions are also processed by a hook.  But in 1.0.7.3, there is a hook call immediately prior to the processing of the shopping cart actions. 

22 hours ago, LeeFoster said:

The wishlist addon has its class file that contains its own count_contents function.

Then it seems to be saying that the $wishlist object is not set.  I would probably replace it with $_SESSION['wishlist'] and it's possible that it is not triggering the wishlist creation for some reason.  Or perhaps it needs to be gated by

if (isset($_SESSION['wishlist'])) {

somewhere. 


Always back up before making changes.

Share this post


Link to post
Share on other sites

The upgrade to 1.0.7.5 has caused issues with this add on, is any one interested in working together to get this fixed?

Share this post


Link to post
Share on other sites
2 minutes ago, LeeFoster said:

The upgrade to 1.0.7.5 has caused issues with this add on, is any one interested in working together to get this fixed?

1.0.7.5?  Or 1.0.7.4?  You should be able to just change the hook to run just before the shopping cart actions.  I did this recently, so I should probably be able to look up the new hook name/location later. 


Always back up before making changes.

Share this post


Link to post
Share on other sites
2 minutes ago, ecartz said:

1.0.7.5?  Or 1.0.7.4?  You should be able to just change the hook to run just before the shopping cart actions.  I did this recently, so I should probably be able to look up the new hook name/location later. 

1.0.7.5, the issue seems to be with get_products() function

Share this post


Link to post
Share on other sites

But the get_products function hasn't changed since 1.0.7.3

The hook I couldn't remember off hand was hook_shop_system__23_parse_actions and listen_startApplication. 


Always back up before making changes.

Share this post


Link to post
Share on other sites
16 hours ago, ecartz said:

But the get_products function hasn't changed since 1.0.7.3

The hook I couldn't remember off hand was hook_shop_system__23_parse_actions and listen_startApplication

Yeah I think the issue is that the hook I was using has been removed/replaced

$OSCOM_Hooks->call('system', 'preActionApp');

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
Sign in to follow this  

×