Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Wishlist 2.0 Support Thread


defender39

Recommended Posts

a few people have had the same problem, not just with this contrib. My OSC version is 2.2 Milestone 2. I've only been using it for a few weeks.

Link to comment
Share on other sites

notset4life Which version of the wishlist are you using?

 

 

Ruben

I've fixed the wishlist paging problem, some of the code just needed to move a little further down the page for some reason.  I've combined your contrib with the normal one  (haven't changed any of your code though) , I'll post it later if you want.

 

The very latest.

Edited by notset4life
Link to comment
Share on other sites

notset4life

Sorry, I don't know what it could be. I was hoping someone else might be able to help if they knew the version number.

 

Ruben

I've uploaded the updated contrib, again.

Link to comment
Share on other sites

notset4life

Sorry, I don't know what it could be. I was hoping someone else might be able to help if they knew the version number.

 

Ruben

I've uploaded the updated contrib, again.

In addition to the reported problem, the page..tHERE ARE NO ITEMS IN YOUR WISHLIST doesn't show the RIGHT column. How do I fix that?

 

 

I also cannot move Items to my Cart from the wishlist. Nothing happens.

Were any core files "modified" in the latest release?

 

Finally, send a wishlist to a friend..again the screen refreshes and nothing happens.

Link to comment
Share on other sites

notset4life

I also cannot move Items to my Cart from the wishlist.? Nothing happens.

Were any core files "modified" in the latest release?

 

Finally, send a wishlist to a friend..again the screen refreshes and nothing happens.

 

I've just re-installed my oscommerce from my backup before I tried the wishlist contrib and then installed the latest wishlist contrib and don't appear to have any problems at all.

 

Are you reading the install.txt? or the readme.txt

Edited by craigey
Link to comment
Share on other sites

Actually, I think I narrowed it down to application top file.

It's a mess with 2.01 lines and 2.02 lines, I have no idea what it should

look like. I also have other mods in there....there is no case_cust_order to

look for, probably due to some mods so I don't know where to add the latest modification.

 

If you can can take a look at the file, I uploaded as text to

http://www.cybermidi.com/application_top.txt

 

I appreciate it.

Link to comment
Share on other sites

I'm getting a page cannot be found.

 

I've just noticed that the install.txt, and the application_top.php files don't appear to have the same code in the zip.

 

Here is the correct code in the application_top.php

case 'cust_order' :     if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
                               if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;

   }
 }

// include the who's online functions










and replace it with this:

     case 'cust_order' :     if (tep_session_is_registered('customer_id') && isset($HTTP_GET_VARS['pid'])) {
                               // begin mod for Wishlist v2.2
                               tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'");
                               // end mod for Wishlist 2.2
                               if (tep_has_product_attributes($HTTP_GET_VARS['pid'])) {
                                 tep_redirect(tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $HTTP_GET_VARS['pid']));
                               } else {
                                 $cart->add_cart($HTTP_GET_VARS['pid'], $cart->get_quantity($HTTP_GET_VARS['pid'])+1);
                               }
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;
// begin mod for Wishlist v2.2
// Add product to the wishlist
     case 'add_wishlist' :   if (ereg('^[0-9]+$', $HTTP_GET_VARS['products_id'])) {
                               if ($HTTP_GET_VARS['products_id']) {
                                 tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . $customer_id . "'");
                                 tep_db_query("insert into " . TABLE_WISHLIST . " (customers_id, products_id, products_model, products_name, products_price) values ('" . $customer_id . "', '" . $products_id . "', '" . $products_model . "', '" . $products_name . "', '" . $products_price . "' )");
                               }
                             }
                             tep_redirect(tep_href_link(FILENAME_WISHLIST));
                             break;
                             
// Add wishlist item to the cart
     case 'wishlist_add_cart': reset ($lvnr);
                               reset ($lvanz);
                                 while (list($key,$elem) =each ($lvnr))
                                       {
                                       (list($key1,$elem1) =each ($lvanz));
                                       tep_db_query("update " . TABLE_WISHLIST . " set products_quantity = '" . $elem1 . "' where customers_id = '" . $customer_id . "' and products_id = '" . $elem . "'");
                                       tep_db_query("delete from " . TABLE_WISHLIST . " where customers_id= '" . $customer_id . "' and products_quantity = '999'");
                                       $produkte_mit_anzahl=tep_db_query("select * from " . TABLE_WISHLIST . " where customers_id = '" . $customer_id . "' and products_id = '" . $elem . "' and products_quantity<>'0'");

                                 while ($HTTP_GET_VARS=mysql_fetch_array($produkte_mit_anzahl))
                                 {
                                 $cart->add_cart($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['products_quantity']);
                                 }
                                         }
                               reset ($lvanz);
                             tep_redirect(tep_href_link(FILENAME_WISHLIST));
                             break;

// remove item from the wishlist
     case 'remove_wishlist':
                             tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $HTTP_GET_VARS['pid'] . "' and customers_id = '" . $customer_id . "'");
                             tep_redirect(tep_href_link(FILENAME_WISHLIST));
                             break;
// end mod for Wishlist v2.2
   }
 }

// include the who's online functions
?>

 

I will re-package this later today.

Link to comment
Share on other sites

ok I've been a total twit, and missed a section of the install.txt

 

I did a complete re-install of my oscommerce and wishlist 2.0. I followed the instructions in the wishlist contribution, install.txt & I noticed the problem that notset4life mentioned occured. So I compared the application_top.php file with the one that I backed up. I found that I had missed this code out of the install.txt

 

 in /catalog/includes/application_top.php

After
-----


     // customer adds a product from the products page
     case 'add_product' :    if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
                               $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
                             }
                             tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
                             break;



Add
---

 // Modificacion Wishlist Checkboxes
	 case 'add_products_wishlist' : if (isset($HTTP_POST_VARS['add_wishprod'])) {
	 if ($HTTP_POST_VARS['borrar'] == 0) {
       foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {
        if (ereg('^[0-9]+$', $value)) {   	 tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = $value and customers_id = '" . $customer_id . "'");
    	 $cart->add_cart($value, $cart->get_quantity(tep_get_uprid($value, $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
       }
  	 }
	 tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
 }
if ($HTTP_POST_VARS['borrar'] == 1) {
   foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {
      if (ereg('^[0-9]+$', $value)) {	
  	 tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = $value and customers_id = '" . $customer_id . "'");
     }
   }
 tep_redirect(tep_href_link(FILENAME_WISHLIST));
   }
}
 break;
 // Fin Wishlist Checkboxes

 

I will double-check that this works on a fresh oscommece install tomorrow and will then upload the contrib if all goes well.

 

Sorry for causing these problems. :unsure: But I hope they are now fixed. :rolleyes:

Link to comment
Share on other sites

No need to be sorry, it comes with the territory, and your hard work is appreciated. By the way, it appeared to fix the problem and everything I mentioned is working.

 

Just one minor thing, the page that shows "there are No products in your wishlist, I would like to include the third column. I only have column left, and the rest of the page shows

 

My Wishlist contains:

 

No products are in your Wishlist

 

 

It's correct, but I would like to see the third column (with shopping cart, etc)

 

Thanks

Link to comment
Share on other sites

I'm glad it worked.

 

Can you post a picture of what you mean by

"there are No products in your wishlist, I would like to include the third column. I only have column left, and the rest of the page shows

 

My Wishlist contains:

 

No products are in your Wishlist

 

 

It's correct, but I would like to see the third column (with shopping cart, etc)

 

On My OSC, I've moved a few bit's around in column left and right. I've also removed the launguages, so I'm not too sure what is normally meant to go where! If you can't post a pic, then send me an e-mail me, I'll reply and you can attach the pic to the e-mail as The board e-mail doesn't let you send pics.

 

Cheers

 

Craig

Edited by craigey
Link to comment
Share on other sites

I had the same prob with the right column not appearing on the right, but instead appearing at the bottom of the left.

 

To fix, I made the following mod:

 

Lines 186-190

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
 <td class="main"><?php echo BOX_TEXT_NO_ITEMS;?></td>
  </tr>
</table>

 

Add the following before that line:

<tr><td>

 

Now it's much happier!

Edited by gemanda
Link to comment
Share on other sites

Right now, the other things I'm debugging...

 

1. With the checkboxes, my site performs neither the Move to Cart nor Delete functions

2. I need the "Add to Wishlist" button to pickup the product quantity

 

I'm working a few more things that may someday be able to be added...

 

Honestly, it looks like a great mod! I just need to tweak it a bit to make it fit my store.

Link to comment
Share on other sites

Hi, Maybe the ones that have problems with the checkboxes, is because there are not the code needed in apliacttion_top.php

 

Add this:

 

// Modificacion Wishlist Checkboxes

case 'add_products_wishlist' : if (isset($HTTP_POST_VARS['add_wishprod'])) {

if ($HTTP_POST_VARS['borrar'] == 0) {

foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {

if (ereg('^[0-9]+$', $value)) {

tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = $value and customers_id = '" . $customer_id . "'");

$cart->add_cart($value, $cart->get_quantity(tep_get_uprid($value, $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

}

if ($HTTP_POST_VARS['borrar'] == 1) {

foreach ($HTTP_POST_VARS['add_wishprod'] as $value) {

if (ereg('^[0-9]+$', $value)) {

tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = $value and customers_id = '" . $customer_id . "'");

}

}

tep_redirect(tep_href_link(FILENAME_WISHLIST));

}

}

break;

 

After:

 

// customer adds a product from the products page

case 'add_product' : if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {

$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

break;

Link to comment
Share on other sites

mutter

That is what it was that I missed. I posted it a few posts back and have added it to the contrib zip file.

 

But before I post it, does the column right need to be as you said Gemanda?

Edited by craigey
Link to comment
Share on other sites

ignore that I found it!

 

I've added the contrib with gemanda's update. I've also made sure that the install.txt includes the missing instruction. :)

Edited by craigey
Link to comment
Share on other sites

Ok, I'm many hours into this...and here's my honest, up-to-the-minute take...

 

As of right now, this mod is worthless to me personally. My customers don't need a placeholder for things for the future...they use their carts for that. I need this to function as more of a Registry.

 

Unfortunately, my attempts to force it to do so are getting nowhere fast. I can't get either quantities or attributes to populate into the DB for the life of me. Without this very basic functionality, I'm toast.

 

Has anyone been able to pass other params than just the product_id? Looking at the DB, it's setup for this to be done, but nothing happens.

Link to comment
Share on other sites

Help help help help!!!!

I installed the contrib, worked absolutely great (or appeared to) except nothing was being added to the wishlist, was being chucked into normal shopping basket. Was looking at application top trying to figure out why it wasnt going into the wishlist, refreshed my browser window to check something and got this message -

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'order by products_name' at line 1

 

The only place I can find 'order by products name'is in wishlist.php - but the scripting looks fine and nobody else appears to have had this problem - what am I doing wrong??

 

FWIW I have the STS template working too - that wouldn't be interfering would it??

Please note - if I have suggested a contrib above, it doesnt mean it will work! Most of the contribs are not ones I've used, but may be useful for your particular problem....

Have you tried a refined search? Chances are your problem has already been dealt with elsewhere on the forums.....

if (stumped == true) {

return(square_one($start_over)

} else {

$random_query = tep_fetch_answer($forum_query)

}

Link to comment
Share on other sites

Error right off the bat ...

 

require(DIR_WS_FUNCTIONS . 'whos_online.php'); tep_update_whos_online(); // include the password crypto functions require(DIR_WS_FUNCTIONS . 'password_funcs.php'); // include validation functions (right now only email address) require(DIR_WS_FUNCTIONS . 'validations.php'); // split-page-results require(DIR_WS_CLASSES . 'split_page_results.php'); // infobox require(DIR_WS_CLASSES . 'boxes.php'); // auto activate and expire banners require(DIR_WS_FUNCTIONS . 'banner.php'); tep_activate_banners(); tep_expire_banners(); // auto expire special products require(DIR_WS_FUNCTIONS . 'specials.php'); tep_expire_specials(); // calculate category path if (isset($HTTP_GET_VARS['cPath'])) { $cPath = $HTTP_GET_VARS['cPath']; } elseif (isset($HTTP_GET_VARS['products_id']) && !isset($HTTP_GET_VARS['manufacturers_id'])) { $cPath = tep_get_product_path($HTTP_GET_VARS['products_id']); } else { $cPath = ''; } if (tep_not_null($cPath)) { $cPath_array = tep_parse_category_path($cPath); $cPath = implode('_', $cPath_array); $current_category_id = $cPath_array[(sizeof($cPath_array)-1)]; } else { $current_category_id = 0; } // include the breadcrumb class and start the breadcrumb trail require(DIR_WS_CLASSES . 'breadcrumb.php'); $breadcrumb = new breadcrumb; $breadcrumb->add(HEADER_TITLE_TOP, HTTP_SERVER); $breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT)); // add category names or the manufacturer name to the breadcrumb trail if (isset($cPath_array)) { for ($i=0, $n=sizeof($cPath_array); $i<$n; $i++) { $categories_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$cPath_array[$i] . "' and language_id = '" . (int)$languages_id . "'"); if (tep_db_num_rows($categories_query) > 0) { $categories = tep_db_fetch_array($categories_query); $breadcrumb->add($categories['categories_name'], tep_href_link(FILENAME_DEFAULT, 'cPath=' . implode('_', array_slice($cPath_array, 0, ($i+1))))); } else { break; } } } elseif (isset($HTTP_GET_VARS['manufacturers_id'])) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturers_query)) { $manufacturers = tep_db_fetch_array($manufacturers_query); $breadcrumb->add($manufacturers['manufacturers_name'], tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'])); } } // add the products model to the breadcrumb trail if (isset($HTTP_GET_VARS['products_id'])) { $model_query = tep_db_query("select products_model from " . TABLE_PRODUCTS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'"); if (tep_db_num_rows($model_query)) { $model = tep_db_fetch_array($model_query); $breadcrumb->add($model['products_model'], tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . $cPath . '&products_id=' . $HTTP_GET_VARS['products_id'])); } } // initialize the message stack for output messages require(DIR_WS_CLASSES . 'message_stack.php'); $messageStack = new messageStack; // set which precautions should be checked define('WARN_INSTALL_EXISTENCE', 'true'); define('WARN_CONFIG_WRITEABLE', 'true'); define('WARN_SESSION_DIRECTORY_NOT_WRITEABLE', 'true'); define('WARN_SESSION_AUTO_START', 'true'); define('WARN_DOWNLOAD_DIRECTORY_NOT_READABLE', 'true'); ?> 
Fatal error: Call to a member function on a non-object in /home/nexuspcc/public_html/catalog/includes/header.php on line 51

 

Line 51 is ...

 

  if ($messageStack->size('header') > 0) {

 

Going to run through the thread to see if anyone else has had this prob .... but if someone knows the solution off-hand, the help would be appreciated.

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...