1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

PHP Help - X-Cart Merge two products??

Discussion in 'HTML & Website Design' started by BannanoPeel, Mar 21, 2010.

  1. #1
    Hello,

    I need some help, currently I am working on a eccommerce site using X-Cart. I am pretty much done except I am trying to make it so that a customer has different options when buying a product

    ex.

    • Digital Download Only
    • Digital Download + CD
    • Digital Download + USB

    I tried everything I can think of to make the code work here is what I have:
     {if $product.appearance.buy_now_buttons_enabled}
        {if $product.forsale ne "B"}
          <div class="buttons-row buttons-auto-separator">
       <a href="cart.php?mode=add&amp;productid=17533&amp;amount=1&amp;redirect_to_cart=Y">
            {include file="CD.tpl" type="input" additional_button_class="main-button add-to-cart-button"}
    </a>
    Code (markup):
    As you can see I have made so that the other "Add-on" Product is in <a> around the button. This had mixed results, sometimes it would work other times not.

    Is their a way to make so that one <a href> link could combine the two products?

    Ex.

    <a href="cart.php?mode=add&amp;productid=17533&amp;add&amp;$productid&amp;amount=1&amp;redirect_to_cart=Y">???

    Sorry I really have no knowledge of PHP at all other than trial and error.

    But any help would be greatly appreciated.
    Thanks,
    Tyler
     
    BannanoPeel, Mar 21, 2010 IP
  2. Greg Meyers

    Greg Meyers Member

    Messages:
    8
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Use the product options module. It does exactly this.

    X-Cart comes with that now, but if you have an older version, it's an add-on module.

    If you have X-Cart 5, it's included in the paid version. Here's a link to the module you need.
    https://market.x-cart.com/addons/product-variants.html

    I hope you find this helpful.
     
    Greg Meyers, Dec 8, 2016 IP