Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wishlist For Phoenix


tmcca

Recommended Posts

1 hour ago, tmcca said:

It's not working the hook as of yet. It will be easier to update in future with hook. Instead of changing the core with a bunch of code you only use one line. Make sense?

Yeah, just looking at the change to core, I'm guessing that would be the hook?

Link to comment
Share on other sites

So the core code change just adds the button to the product in the listing page? I'd be inclined to leave that out.

Get this error after installing the box -

Fatal error: Uncaught Error: Call to a member function count_contents()

Clicking add to wish list adds the item to the shopping cart.

Also the zip package is missing the account and navbar modules.

So as it stands I can't add anything to the wish list and can't view it.

Edited by LeeFoster
Link to comment
Share on other sites

Done some more testing found the following - 

Account Wish list has no language file.

wishlist.php gives the error 

Fatal error: Uncaught Error: Call to a member function get_products() on null in C:\xampp\htdocs\360v3\wishlist.php:16 Stack trace: #0 {main} thrown in C:\xampp\htdocs\360v3\wishlist.php on line 16

Adding to wishlist still adds to cart

Installing Wishlist box now gives the error 

Fatal error: Uncaught Error: Call to a member function count_contents() on null in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php:34 Stack trace: #0 C:\xampp\htdocs\360v3\includes\system\versioned\1.0.4.0\osc_template.php(102): bm_wishlist->execute() #1 C:\xampp\htdocs\360v3\includes\template_top.php(13): oscTemplate->buildBlocks() #2 C:\xampp\htdocs\360v3\account.php(24): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php on line 34

Link to comment
Share on other sites

45 minutes ago, tmcca said:

try it now

These errors still occur - 

wishlist.php gives the error 

Fatal error: Uncaught Error: Call to a member function get_products() on null in C:\xampp\htdocs\360v3\wishlist.php:16 Stack trace: #0 {main} thrown in C:\xampp\htdocs\360v3\wishlist.php on line 16

Adding to wishlist still adds to cart

Installing Wishlist box now gives the error 

Fatal error: Uncaught Error: Call to a member function count_contents() on null in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php:34 Stack trace: #0 C:\xampp\htdocs\360v3\includes\system\versioned\1.0.4.0\osc_template.php(102): bm_wishlist->execute() #1 C:\xampp\htdocs\360v3\includes\template_top.php(13): oscTemplate->buildBlocks() #2 C:\xampp\htdocs\360v3\account.php(24): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php on line 34

Link to comment
Share on other sites

14 minutes ago, LeeFoster said:

wishlist.php gives the error 

Fatal error: Uncaught Error: Call to a member function get_products() on null in C:\xampp\htdocs\360v3\wishlist.php:16 Stack trace: #0 {main} thrown in C:\xampp\htdocs\360v3\wishlist.php on line 16

This error is down to me not adding the hook to application_top.php

 

14 minutes ago, LeeFoster said:

Adding to wishlist still adds to cart

Installing Wishlist box now gives the error 

Fatal error: Uncaught Error: Call to a member function count_contents() on null in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php:34 Stack trace: #0 C:\xampp\htdocs\360v3\includes\system\versioned\1.0.4.0\osc_template.php(102): bm_wishlist->execute() #1 C:\xampp\htdocs\360v3\includes\template_top.php(13): oscTemplate->buildBlocks() #2 C:\xampp\htdocs\360v3\account.php(24): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php on line 34

These 2 still persist.

Link to comment
Share on other sites

Changing hook in application top from 

// BOF WISHLIST
$OSCOM_Hooks->register('wishlist');
echo $OSCOM_Hooks->call('wishlist', 'WishListMod');
// EOF WISHLIST

to 

// BOF WISHLIST
$OSCOM_Hooks->register('wishlist');
$OSCOM_Hooks->call('wishlist', 'WishListMod');
// EOF WISHLIST

Has resolved 

29 minutes ago, LeeFoster said:

Fatal error: Uncaught Error: Call to a member function count_contents() on null in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php:34 Stack trace: #0 C:\xampp\htdocs\360v3\includes\system\versioned\1.0.4.0\osc_template.php(102): bm_wishlist->execute() #1 C:\xampp\htdocs\360v3\includes\template_top.php(13): oscTemplate->buildBlocks() #2 C:\xampp\htdocs\360v3\account.php(24): require('C:\\xampp\\htdocs...') #3 {main} thrown in C:\xampp\htdocs\360v3\includes\modules\boxes\bm_wishlist.php on line 34

Still can't add to wishlist though.

Link to comment
Share on other sites

in application_top remove the hook or comment it out and replace it with this:

 

// BOF WISHLIST		 
 // wishlist data		 
         if (!tep_session_is_registered('wishList') || !is_object($wishList)) {		
                 tep_session_register('wishList');		
                 $wishList = new wishlist;		
         }		

  //Wishlist actions (must be before shopping cart actions)		
   if (isset($_POST['wishlist'])) {		
           if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) {		
       $attributes = isset($_POST['id']) ? $_POST['id'] : '';		
       $wishList->add_wishlist($_POST['products_id'], $wishList->get_quantity(tep_get_uprid($_POST['products_id'], $attributes))+1, $attributes);		
           }		
                 if (WISHLIST_REDIRECT ==  'No') tep_redirect(tep_href_link('product_info.php', 'products_id=' . $_POST['products_id']));		
           tep_redirect(tep_href_link('wishlist.php'));		
   }

 

Edited by tmcca
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...