Announcement

Collapse
No announcement yet.

Add to cart from best sellers/also bought using add to cart from anywhere

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Add to cart from best sellers/also bought using add to cart from anywhere

    Hi all,

    Just been playing with this as its been bugging me, so I tested to see if the adding to cart from anywhere would work if the variables were put in the markup for the link, so I used the following as a test:

    <a href="http://www.your.url/cgi-bin/ca000001.pl?SID=<Actinic:Variable Name="SectionID"/>&PAGE=PRODUCT&Q_<actinic:variable name="ProductReference" />=1">Buy Now</a>

    Now, looking at the SID when the page is created it does show the current section number, however my own quick test:

    http://www.mdnsupplies.co.uk/shop/16...-splitter.html

    Does seem to be working, the best sellers list at the bottom of the page has the Buy Now link and does add the correct item to the cart, if anyone here would be willing to take a look and clarify that it works for them as well it could be a nice work around, without having to hand code each one.

    I know there would be pitfalls if your script number changed, but a single correction in the layout would then change them all.

    Please anyone with 5 minutes test it, and anyone who may see any other issues, please post to let me and anyone else know if this would cause any unwanted problems.

    Thanks
    Many Thanks
    Lee
    www.mdnsupplies.co.uk
    www.hookandloopfasteners.co.uk

    #2
    This works fine for example:
    http://www.mdnsupplies.co.uk/cgi-bin...&Q_MDN16A3WS=1

    There is also a variable that returns the script ID too, but I'm not in front of SellerDeck at the moment.

    If it doesn't work in your coding then try the following instead:
    <a href="http://www.your.url/cgi-bin/ca000001.pl?SID=<Actinic:Variable Name="SectionID"/>&PAGE=PRODUCT&Q_<actinic:variable name='ProductReference' />=1">Buy Now</a>
    (Changed double to single uotes)

    Comment


      #3
      Variable: <actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />

      May be of use to you.

      Also, see http://www.drillpine.biz/v9greyboxsi...log/Books.html where I show how you can open a lightbox for similar items so they can be added to cart along with Attributes / Choices, Prompts, etc.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks Norman,

        Working with the variable you posted I have amended the url to the following:

        <a href="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />?SID=<Actinic:Variable Name="SectionID"/>&PAGE=PRODUCT&Q_<actinic:variable name="ProductReference" />=1">Buy Now</a>

        So this way if the script number changes the code stays the same, perfect.

        Thanks again
        Many Thanks
        Lee
        www.mdnsupplies.co.uk
        www.hookandloopfasteners.co.uk

        Comment


          #5
          As a bit of an update here and after an issue where the code led to a blank page if the item was out of stock, I have amended it so that it displays Out of Stock stopping the customer from clicking a button when using Sellerdeck stock control, the working code is now:

          <actinic:block if="%3cactinic%3avariable%20name%3d%22IsInStock%22%20%2f%3e"><br /><div class="small_button_add_to_cart_also"><a href="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />?SID=<Actinic:Variable Name="SectionID"/>&PAGE=PRODUCT&Q_<actinic:variable name="ProductReference" />=1">Buy Now</a></div></actinic:block><actinic:block if="%3cactinic%3avariable%20name%3d%22IsInStock%22%20%2f%3e%20%3d%3d%20false" ><br /><div class="outofstock-also">Out of Stock</div></actinic:block>

          The classes can be set to your own or removed so that is simply shows text links, a working demo is here:

          http://www.bedsbbq.co.uk/barbecue-sh...-barbecue.html
          Many Thanks
          Lee
          www.mdnsupplies.co.uk
          www.hookandloopfasteners.co.uk

          Comment

          Working...
          X