Merging Two Product URL's??? Don't know PHP AT ALL :(

Discussion in 'PHP' started by BannanoPeel, Mar 22, 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:
    Code:

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

    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 22, 2010 IP