Brance Posted March 14, 2006 Share Posted March 14, 2006 this is a follow up to my last post. we found the fix for this problem suggested by Bighawk. <?php echo tep_draw_form('wishlist_form', tep_href_link(FILENAME_WISHLIST_PUBLIC, 'public_id=' .$public_id)); ?> this seems to work in so far as it now correctly adds the product to my cart from wishlist_public.php, but... ...it does not remove the item from the wishlist after I purchase it. I have two users created. the wishlist belongs to user A. I'm logged in as user B and purchasing it from user A's wishlist. should it remove the item from the wishlist (belonging to user A) when user B purchases it for them? I would like it to, but I'm not sure the module functions that way. On an additional note, I would also like to be given the option, as user B, to ship the item to user A (to whom the wishlist belongs). how big a deal would that be? anybody know how to make that happen? thanks, Brance Quote Link to comment Share on other sites More sharing options...
dblake Posted March 15, 2006 Author Share Posted March 15, 2006 Thats a lot of coding that I won't be doing for free. That will be more like a gift registry, not a wishlist. Maybe there is a contribution out that does that, I don't know. But that is what your looking for. -Dennis Quote Link to comment Share on other sites More sharing options...
Brance Posted March 15, 2006 Share Posted March 15, 2006 I was able to make it do this by adding this code to wishlist_public.php at line 19 // add wishlist_delete session variable $wishlist_delete = $public_id; session_register("wishlist_delete"); // end wishlist_delete session variable and then in includes/classes/wishlist.php I changed tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $wishlist_products[products_id] . "' and customers_id = '" . $customer_id . "'"); to tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $wishlist_products[products_id] . "' and customers_id = '" . $_SESSION["wishlist_delete"] . "'"); I think that was line 106 and then the same thing in the next line that alters TABLE_WISHLIST_ATTRIBUTES. any reason not to do it this way? it seems to work just fine and do exactly what I wanted it to do. this way if they email their wishlist to 10 people, when the first person buys an item off their wishlist, it removes it so that other people won't buy it for them a second time. Quote Link to comment Share on other sites More sharing options...
Brance Posted March 15, 2006 Share Posted March 15, 2006 ok, one last thing. I had to go back into includes/classes/wishlist.php and add this line of code after the last changes I made session_unregister("wishlist_delete"); so now my includes/classes/wishlist.php file looks like this at line 99 function clear() { global $customer_id; // Remove all from database // changed $customers_id to $_SESSION["wishlist_delete"] if (tep_session_is_registered('customer_id')) { $wishlist_products_query = tep_db_query("select products_id from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . $customer_id . "'"); while($wishlist_products = tep_db_fetch_array($wishlist_products_query)) { tep_db_query("delete from " . TABLE_WISHLIST . " where products_id = '" . $wishlist_products[products_id] . "' and customers_id = '" . $_SESSION["wishlist_delete"] . "'"); tep_db_query("delete from " . TABLE_WISHLIST_ATTRIBUTES . " where products_id = '" . $wishlist_products[products_id] . "' and customers_id = '" . $_SESSION["wishlist_delete"] . "'"); session_unregister("wishlist_delete"); } } } Quote Link to comment Share on other sites More sharing options...
dblake Posted March 15, 2006 Author Share Posted March 15, 2006 (edited) Well what happens if a person browses the public wishlists? What happens if I send you my wishlist and you click on it, and say HEY I want that. So you buy it for yourself and it gets deleted from "my" wishlist? Or what happens if you have items in your wishlist and decide to purchase them. If you dont view or add the items from your public wishlist, they will never get deleted as its looking for the session variable that you defined on the public_wishlist.php page. Just things to think about if you want the full proof. -Dennis Edited March 15, 2006 by dblake Quote Link to comment Share on other sites More sharing options...
Brance Posted March 15, 2006 Share Posted March 15, 2006 this unregisteres the wishlist with the session. that way if customer B returns and buys something else for himself that was on customer A's wishlist, it won't get removed from A's wishlist. the problem now is unregistering this variable when they don't buy anything from the wishlist. I'm working on it, but feel free to chime in if you have any ideas. Quote Link to comment Share on other sites More sharing options...
dblake Posted March 15, 2006 Author Share Posted March 15, 2006 OH also, your unregister is within the while loop, so if there is more than one item purchased, it will only clear the first one as the variable will be cleared before teh 2nd one can go through. -Dennis Quote Link to comment Share on other sites More sharing options...
Plascual Posted March 16, 2006 Share Posted March 16, 2006 I installed the Wishlist Contribution 3.5d, and it's very helpful. One thing: If you type wishlist_public.php?public_id=#, it shows the user's first name, and the wishlist of that user in realtime. By the time it was sent, the user may have changed this list. It can be problematic if user wants to send different wishlist to different people. Here is how I would like to modify the contribution: User "A" would keep his own wishlist private and could create more than one wishlist. When comes the time to send his wishlist, user "A" select the one he wish to send. User "B" receives the email. The link it contains would let recipient add the products specified in that link to one of his wishlists or create a new one and give it a new name. I would need your advice on this... Would someone help to put this in concrete form? Thanks in advance Quote Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2006 Share Posted March 22, 2006 Thanks in Adavnced for your Help! I installed this great contribution but the add to wishlist button does not appear. This is the code from my catalog/product_info.php <td ><a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . $cPath); ?>"><?php echo tep_image_button('button_back.gif', IMAGE_BUTTON_BACK); ?></a></td> <td ><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td> <td ><?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"'); ?></td> <td ><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td> As you can see i have a back button in there also. Thanks again. Quote Link to comment Share on other sites More sharing options...
dblake Posted March 22, 2006 Author Share Posted March 22, 2006 Your probably using some kind of cache contribution or some other contribution thats using a different file. -Dennis Quote Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2006 Share Posted March 22, 2006 Your probably using some kind of cache contribution or some other contribution thats using a different file. -Dennis Any idea how to debug? Quote Link to comment Share on other sites More sharing options...
dblake Posted March 22, 2006 Author Share Posted March 22, 2006 Hmm, know what contributions you install and what they do? You would have to just review and look around to debug. Clear cache in admin console? -Dennis Quote Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2006 Share Posted March 22, 2006 Hmm, know what contributions you install and what they do? You would have to just review and look around to debug. Clear cache in admin console? -Dennis Thanks Dennis! These are the Contributions i have installed 1. Basic Design Pack 1mk6 2. Ultimate SEO URLs 3. cDynamic Meta Tags v1.4 4. Free amount 3.5c 5. Fast easy checkout 3.0 6. Google XML Sitemap 7. Margin Reporting v2.5.6 8. Easy populater 2.79a 9. Dynamic sitemap v1.6 10. UPSXML v1.2.2 11. Froogle datafeeder v162d SEO 12. Allproducts 13. Average rating 1.1 14. QBI 15. Optimize_tep_get_tax_ratev1.1 Quote Link to comment Share on other sites More sharing options...
dblake Posted March 22, 2006 Author Share Posted March 22, 2006 Dunno what basic design pack does, but try clearing your cache in admin, then I have seen a contribution move your product_info.php page to the index.php page. Dunno but I have seen it, you may want to check there. Otherwise I couldn't tell ya without looking at it myself. -Dennis Quote Link to comment Share on other sites More sharing options...
Guest Posted March 22, 2006 Share Posted March 22, 2006 Dunno what basic design pack does, but try clearing your cache in admin, then I have seen a contribution move your product_info.php page to the index.php page. Dunno but I have seen it, you may want to check there. Otherwise I couldn't tell ya without looking at it myself. -Dennis From the install instructions Basic design pack 1.6This is not a real contribution as such...its just an easy to use short-cut to make your own osc design. What will this pack do? 1. It will center your shop and give you the possibilety to set outside background color in the stylesheet. 2. It will remove the default oscommerce cartoonish icons 3. It removes the rounded infobox corners and replaces them with square transparent ones, so you can change the colors in the styleaheet. 4. It removes the osCommerce banner in the footer 5. It will make it easy to have 1 top graphic logo filling the whole header width. 6. It will make automatic thumbnails of your products images 7. It will replace all your graphical buttons with css based ones , ie. button styles is defined in teh stylesheet and will automatically adjust to suit different languages. 8. It will give you a new categories/menu box with a better and more intuitiv marking of navigation. This menu is further customizable in stylesheet.css and uses 3 images located in this folder images/categories/ I do not have #7 the css buttons installed. I use the regular osc buttons. Any other ideas how to fix the Wishlist button? Quote Link to comment Share on other sites More sharing options...
Guest Posted March 23, 2006 Share Posted March 23, 2006 Hi Wishlist guys, I have a question. I need the following functionallity: Repeat customers come back to reorder the same products. Instead of looking up the products they need, they have multiple wishlists stored in my website's database. So they spend some time preparing, filling and organizing wishlists for themselfs and then quickly fill a cart from their wishlists with poducts needed over and over again. So It is probably not a wishlist, it's more like favorite items lists. So my questions are: Is this contribution capable of doing this? Do you know any other contribution which does it? Is it posible/planed to include such functionality into this contribution? Thank you. Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted March 23, 2006 Share Posted March 23, 2006 (edited) Hi Jacob, Just remove the addition that was added to checkout_process.php; $wishList->clear();00 and your customers wishlist should be unchanged after buying the items. I am using the wihlist as a favorite items list. And thanks to Dennis who helped me with this earlier.. :) Edited March 23, 2006 by Fredrik.r Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted March 23, 2006 Share Posted March 23, 2006 Should not be "\0\0" in the code above. Don't know why it is that way, I tired to edit my reply but It wont go away.. $wishList->clear(); Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted March 23, 2006 Share Posted March 23, 2006 (edited) Two months ago I asked if it's possible to add a feature in the contribution "Simple Wishlist Report" that reports if the customers has sent their wish list to friends, how many that received the list and so on. I'm just wondering if someone has done this? It is of big interest to really see if the customers are sending out their wishlist. I am not trying to fetch or collect their email addresses, that is not needed or fair. I just want to see if they are using their lists and informing friends.. The Simple Wishlist Report is quite simple and it's just showing which items visitors have put in ther lists. Sorry, but their is no thread for Simple Wishlist Report. Edited March 23, 2006 by Fredrik.r Quote Link to comment Share on other sites More sharing options...
Guest Posted March 23, 2006 Share Posted March 23, 2006 Thanks Fredrik, This may work for me, I'll give it a try. :) But there are no multiple lists, which would be sweet :( Well, at least I can start from here. Thank you. Best Regards. Quote Link to comment Share on other sites More sharing options...
dblake Posted March 23, 2006 Author Share Posted March 23, 2006 Will take some planning and coding/db knowledge but you can build a function that will take the user/sending the email's id (if logged in) email (if guest, and you could use for marketing purposes to actually get them to sign up) and who they sent it to, (collect emails so what, its good marketing for you) then you have a target audience of who uses it, and a target audience of potential buyers. Put all in the db for you ;) Then you can do anything with it :) -Dennis Quote Link to comment Share on other sites More sharing options...
dblake Posted March 23, 2006 Author Share Posted March 23, 2006 I need to get paid for that knowledge holy smoke :P -Dennis Quote Link to comment Share on other sites More sharing options...
Plascual Posted March 24, 2006 Share Posted March 24, 2006 (edited) Thanks Fredrik, This may work for me, I'll give it a try. :) But there are no multiple lists, which would be sweet :( Well, at least I can start from here. Thank you. Best Regards. Hi LAMPB, I posted a request few days ago about multiple wishlist/favorites... here's the link: http://www.oscommerce.com/forums/index.php?sho...=166244&st=440# [post#458] I've not started yet... and I think I'm gonna need help! Edited March 24, 2006 by Plascual Quote Link to comment Share on other sites More sharing options...
Guest Posted March 24, 2006 Share Posted March 24, 2006 Hi Plascual, I'd be glad to help, but I'm afraid I can't. I'm such a newbie. I haven't even finish my first book on PHP. :) If you see that I can be of any help let me know. Regards. Quote Link to comment Share on other sites More sharing options...
dblake Posted March 28, 2006 Author Share Posted March 28, 2006 Does everyones attributes work? Even if they have multiple attributes per product, or is that still not working correctly? -Dennis Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.