Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2006
    Posts
    85
    Plugin Contributions
    0

    Default Suggest a product category if it's not in the cart?

    Hi! I would like, on viewing the cart, to have a message suggesting a particular type of product (in this case, a greeting card) to go with your purchase. But - here's the kicker - only if you haven't already got a greeting card in your cart already!

    I've used the Better Together plugin to offer discounts when buying two products together, but in this case there's no discount - I just want to suggest that people add the other item.

    Is there some PHP I could use on the cart page that could in effect say, "If no items currently in the cart are from Category 6, print this message: 'Why not add a greeting card to your order?' "

    Does that make sense? Is it possible and/or (dare I hope) easy?

    Thanks!
    Adam

  2. #2
    Join Date
    Nov 2007
    Location
    Canada
    Posts
    50
    Plugin Contributions
    0

    Default Re: Suggest a product category if it's not in the cart?

    Hay Adam,
    The answer is kinda, sorta but not really.

    There is a great contribution called Cart Upsell / Cross sell that will extend the Cross Sell contribution to the shopping cart and show items from the cross sell selection of the items in the cart. Don’t worry about the version number of it. It works just fine with my 1.3.8 cart install.

    http://www.zen-cart.com/index.php?ma...roducts_id=283

    However, it’s not exactly what you want. It’s the closest thing to it available. It will set up the cross sell for products not categories. So if you associate Card 1 to Product 1 and Card 2 to Product 2 (seems like you don’t care what card just that its one of them) if a customer Buys Product 1 and no cards it will suggest a card in this case Card 1. However if they buy Product 1 and any other card except Card 1 it will still suggest Card 1.

    So as stated, kinda, sorta but not really. If you are comfortable with php you might be able to adjust the code. Extend the code so that when checking the product ID in cart for inclusion of cross sell items it also checks for the category number and if category number for products in cross sell match any product category ID already in the cart then do not display cross sell.

    It would still only show (a) particular card(s) in the cross sell and not a category. If you have the exclusion going you can load multiple Cards as cross sells to each products so more than one shows.

    It’s not exactly what you are looking for but it might be a starting point.

    So as for possible Yes. as for easy that depends on your php skils.

    nev

  3. #3
    Join Date
    Jun 2006
    Posts
    85
    Plugin Contributions
    0

    Default Re: Suggest a product category if it's not in the cart?

    Thanks for the summary! You're right though, it's not quite what I was hoping for. And my PHP skills are still pretty rudimentary.

    I'll just add a "boilerplate" text message suggesting that shoppers add a card, and won't worry about whether or not they have one already in their cart. For now, at least.

    Thanks though!
    adam

 

 

Similar Threads

  1. Need help!!! when adding new product to a category the Cart Box not showing
    By datvtran in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 21 Mar 2009, 06:21 PM
  2. suggest a product
    By rajeev83 in forum General Questions
    Replies: 0
    Last Post: 17 Jun 2007, 01:48 PM
  3. Replies: 2
    Last Post: 31 Oct 2006, 08:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg