Announcement

Collapse
No announcement yet.

Mini best seller layout and add to cart

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

    Mini best seller layout and add to cart

    Hi,
    I am using "mini best seller layout" for the front page, design "smart"
    It does not show "add to cart". It says "find out more" and than the customer can click on "add to cart"

    How do I add "Add to cart" to the front page (mini best seller layout)

    Thanks for your help

    Peter

    #2
    What have you tried so far? have you added the add to cart layout into the mini best seller and tested to see if it works?

    Comment


      #3
      Hi,
      I am new to all this.
      How can I do this. I have gone through the getting started guide and cannot find this information.

      Thanks for your help

      Peter

      Comment


        #4
        As you may have guessed from the silence from other forum members, this isn't really possible to do.

        The 'New Products' and 'Best Sellers' sections in the default store show you how you can generate a marketing list that looks like a standard product list, and add to cart from that, but it isn't really possible to add to cart from the list that appears in the sidebar.

        Comment


          #5
          I can be done but will involve a lot of additional processing time if you have many products.

          The following code can be added to a Best Seller or New Product layout to give it an Add to Cart.
          Code:
          <!-- Add to Cart on Best Sellers / New Products -->   
          <actinic:block php="true">
          	$bestsellerID = '<actinic:variable name="ProductID" encoding="perl" selectable="false" />';
          </actinic:block>
          <actinic:block type="EntireSectionList">
          	<actinic:block type="ProductList">
          		<actinic:block php="true" >
          			$productID = '<actinic:variable name="ProductID" encoding="perl" selectable="false" />';
          			if ($productID == $bestsellerID)
          				{
          				$code = <<<ENDOFCODE
          <!-- START Additional Product Layout Variables -->
          <br clear="all">
          <form method="post" action="<actinic:variable name="OnlineScriptURL" value="Shopping Cart Script URL" />"> 
          	<input type="hidden" name="SID" value="<Actinic:Variable Name="SectionID"/>" />
          	<input type="hidden" name="PAGE" value="PRODUCT" />           
          	<input type="hidden" name="PAGEFILENAME" value="<actinic:variable name="SectionPageName" />" />
          	<Actinic:SECTION BLOB='<Actinic:Variable Name="SectionCatFile"/>'/>
          	<actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">
                      <!-- Hidden field when in trial mode -->
                      <input type="hidden" name="SHOP" value="<Actinic:Variable Name="HiddenFields"/>" />
          	</actinic:block>
          	<actinic:variable name="AttributeList" />
          	<actinic:variable name="ComponentList" />
          	<actinic:block if="%3cactinic%3avariable%20name%3d%22IsQuantityPromptShown%22%20%2f%3e">
          		<span class="actrequired">Qty:</span>
          		&nbsp;
          		<input type="text" name="Q_<actinic:variable Name="ProductID"/>" size="2" value="<Actinic:Variable Name="DefaultQuantity"/>" />
          	</actinic:block>
          	<actinic:block if="%3cactinic%3avariable%20name%3d%22IsQuantityPromptHidden%22%20%2f%3e">
          		<input type="hidden" name="Q_<actinic:variable Name="ProductID"/>"  value="<actinic:variable name="DefaultQuantity"/>" />
          	</actinic:block>
          	&nbsp;
          	<actinic:block if="%3cactinic%3avariable%20name%3d%22IsAddToCartButtonShown%22%20%2f%3e%20AND%20%0d%28%3cactinic%3avariable%20name%3d%22NumberAttributesInPushButtonGrid%22%20%2f%3e%20%3d%3d%200%29" >
          		<actinic:variable name="AddToCartButton" />
          	</actinic:block>
          	<br /><actinic:variable name="CartError" />
          </form>
          <!-- END Additional Product Layout Variables -->
          ENDOFCODE;
          				echo $code;
          				}
          		</actinic:block>
          	</actinic:block>
          </actinic:block>
          This is a stripped down layout and doesn't include Other Info / Date prompts. It does allow for Choices and Components.

          This works by scanning the entire Section and Product list for each best seller / new product shown. This could require a lot of processing time on large sites. Try it and see.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Originally posted by cdicken
            "but it isn't really possible to add to cart from the list that appears in the sidebar.
            I want to have add to cart for the products listed on home page not the sidebar.

            Regards
            Peter

            Comment


              #7
              I want to have add to cart for the products listed on home page not the sidebar.
              Then put the code from my post #5 above into the Layouts that these items use.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                I pasted Norman's solution into my home page featured product layout
                http://www.graphicz.eu.com/site1/
                and it looks fine but when clicking the add to cart button I get
                Error: The requested file (acatalog/Books.html) is outside the scope of the script. If you believe the requested page should be served please contact the site operator.
                I have a sidebar product layout on the home page too and this produces the same error on the home page but it does work on other brochure pages. Can we make the 'Add to Cart' button work on the home page - ie. outside the acatalog folder?

                Thanks
                Jonathan Chappell
                Website Designer
                SellerDeck Website Designer
                Actinic to SellerDeck upgrades
                Graphicz Limited - www.graphicz.co.uk

                Comment


                  #9
                  Try changing
                  Code:
                  	<input type="hidden" name="PAGEFILENAME" value="<actinic:variable name="SectionPageName" />" />
                  to
                  Code:
                  	<input type="hidden" name="PAGEFILENAME" value="<actinic:block php="true">echo basename('<actinic:variable name="SectionPageName" encoding="perl" selectable="false" />');</actinic:block>" />
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Thanks Norman, but still the same error. The page source still says
                    Code:
                    <input type="hidden" name="PAGEFILENAME" value="acatalog/Tulips.html" />
                    I think we might need some way to remove the acatalog/ from acatalog/Tulips.html as I am guessing that the file ca000001.cgi is expecting a reference to the 'Section Page Name' not to 'acatalog/Section Page Name'.
                    Does that make any sense?

                    Thanks
                    Jonathan Chappell
                    Website Designer
                    SellerDeck Website Designer
                    Actinic to SellerDeck upgrades
                    Graphicz Limited - www.graphicz.co.uk

                    Comment


                      #11
                      Even if I hard code
                      Code:
                      <input type="hidden" name="PAGEFILENAME" value="Tulips.html" />
                      when you insect the element (view source) Actinic has added the acatalog/
                      Code:
                      <input type="hidden" name="PAGEFILENAME" value="acatalog/Tulips.html" />
                      Jonathan Chappell
                      Website Designer
                      SellerDeck Website Designer
                      Actinic to SellerDeck upgrades
                      Graphicz Limited - www.graphicz.co.uk

                      Comment


                        #12
                        basehref will be intervening there i suspect, what happens if you hard code the full url?

                        Comment


                          #13
                          Thanks Lee - It didn't like that either! Same error.
                          Jonathan Chappell
                          Website Designer
                          SellerDeck Website Designer
                          Actinic to SellerDeck upgrades
                          Graphicz Limited - www.graphicz.co.uk

                          Comment


                            #14
                            Whoops! Oh yes it does!

                            Sorry Lee - The following does work:

                            Code:
                            <input type="hidden" name="http://www.graphicz.eu.com/site1/acatalog/<actinic:variable name="SectionPageName" encoding="perl" selectable="false" />" />
                            As did this:

                            Code:
                            <input type="hidden" name="<actinic:variable name="WebSiteURL" />acatalog/<actinic:variable name="SectionPageName" encoding="perl" selectable="false" />" />
                            Thank you Lee and Norman
                            Jonathan Chappell
                            Website Designer
                            SellerDeck Website Designer
                            Actinic to SellerDeck upgrades
                            Graphicz Limited - www.graphicz.co.uk

                            Comment


                              #15
                              There's a variable for CATALOGURL, better to use that that WEBSITEURL and adding acatalog, also covers you for when people change the acatalog name that way.

                              Comment

                              Working...
                              X