Announcement

Collapse
No announcement yet.

2 Add to Cart buttons in sub section links

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

    2 Add to Cart buttons in sub section links

    Hi

    I have followed the instructions in the Advanced User Guide re:
    Creating a Listing Page which Links Through to Full Details Pages – Method 2, as detailed on page 24, and have created sub-sections linking to each product.

    However, most of my products are to have Fragments above them (linking to various information pages). When the Fragments are inserted I end up with 2 Add to Cart buttons on the sub-section links.

    Any suggestions please???

    #2
    Url so we can see???

    Comment


      #3
      Sorry, I can't give you a URL as this is a new site that I am working on and I haven't got anywhere to upload it to.

      Basically, I have created a sub section which links to the product. This displays the product image, a brief description, the price, a "more info" link to the full product details and an Add to Cart button on the right hand side - this is all taken from the full product page.

      When I include a Fragment on the product page I end up with 2 Add to Cart buttons on the sub section.

      The code I have used for the sub section is:

      Code:
       <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductFormUsed%22%20%2f%3e">
      <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:block>
      
      <div class="product_list">
      <div class="image_product"><a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" target="_self"><img alt="<actinic:variable name="SectionName" encoding="strip"/>" src="<actinic:variable Name="SectionImageFileName"/>" border="0" /></a></div>
      <div><h3 class="product"><a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" target="_self"><span style="color:<actinic:variable name="Palette2" />"><actinic:variable name='SectionName'/></span></a></h3></div>
      <actinic:block type="ProductList" >
      <div style="float: right;">
      <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" /><br>
      <span class="actrequired"><Actinic:Variable Name="QuantityPrompt"/></span><br>
      <input type="text" name="Q_<Actinic:Variable Name="ProductReference"/>" size="4" value="<Actinic:Variable Name="DefaultQuantity"/>" class="form_input_general" />
      </actinic:block>
      </div>
      <actinic:block type="PriceList" >
      <b><actinic:variable name="PriceLayout" /></b><br><br>
      </actinic:block>
      <actinic:block php="true" >
      $sShort = "";
      $nCount = 0;
      $sOriginal = '<actinic:variable encoding="perl" name="ProductDescription" selectable="false" />';
      foreach(explode(" ", $sOriginal) as $sWord)
      {
      if ($nCount > 10)
      {
      $sShort .= "...";
      break;
      }
      $sShort .= $sWord . " ";
      $nCount++;
      }
      echo $sShort;
      </actinic:block>
      </actinic:block>
      <br><a href="<actinic:block if="%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20AND%0d%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e" ><actinic:variable name="SectionPageName" /></actinic:block><actinic:block if="%28%3cactinic%3avariable%20name%3d%22IsLoginPageSuppressed%22%20%2f%3e%20%3d%3d%20false%29%20OR%0d%28%3cactinic%3avariable%20name%3d%22UnregCustomersAreNotAllowed%22%20%2f%3e%20%3d%3d%20false%29" ><actinic:variable name="SectionURL" /></actinic:block>" target="_self">Full Details...</a>
      </div>
      
      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductFormUsed%22%20%2f%3e">
      </form>
      </actinic:block>

      Comment


        #4
        I had the same issue on a clients site .. it should be called "single item per section" as it counts the fragment and inserts the code accordingly. Still have on the Jont "wish list" to see if using a condition to count the list will ignore the fragment.


        Bikster
        SellerDeck Designs and Responsive Themes

        Comment


          #5
          I've definitely heard of this before, can't for the life of me remember the solution. It will be somewhere in the forum though, probably very difficult to find though.

          Comment


            #6
            Originally posted by leehack
            probably very difficult to find though.
            That you negating a "search the forum" reply Lee


            Bikster
            SellerDeck Designs and Responsive Themes

            Comment


              #7
              I haven't got anywhere to upload it
              how can you develop a site which is not on a test server is beyond me

              Comment


                #8
                Originally posted by jont
                That you negating a "search the forum" reply Lee
                No i'd happily say STFF if i thought it was necessary, like with you recently you lazy little sod . I just think this one could be hard to find but if no luck with any answers, it may be worth the trawl.

                Comment


                  #9
                  Originally posted by RuralWeb
                  how can you develop a site which is not on a test server is beyond me
                  Always surprises me too i must say, uploading is the very first thing i check before anything. Too many ingredients in the pot later IMO. It's a bit like buying a bed, but having no house to put it in otherwise.

                  Comment


                    #10
                    Originally posted by leehack
                    It's a bit like buying a bed, but having no house to put it in otherwise.
                    I bought a dining table and chairs and had it delivered to storage! Then again I am on v8.5.0 so the analogy probably holds true


                    Bikster
                    SellerDeck Designs and Responsive Themes

                    Comment


                      #11
                      Madness is not exclusive to new site owners Jonty, you have regularly displayed that you have your fair share.

                      Comment


                        #12
                        Cheers matey - I have worked long and hard on it - glad to finally get peer recognition.


                        Bikster
                        SellerDeck Designs and Responsive Themes

                        Comment


                          #13
                          I've had a good trawl through the forum but couldn't find anything relating to this problem.

                          As an alternative, is it possible to put a fragmenty type section at the top of extended info pages, above the product details, that will display a small image, a bit of text and a link?

                          Look!! No Hands
                          I am only dabbling with the site layout at this stage. If it looks ok I will transfer it over to my existing site which has been up and running perfectly for some time (without the use of a test server) but thank you all for your concern.

                          Comment


                            #14
                            Stephen i think you are going down the wrong route and need to be stopped while we have chance. Have a look through the forum on posts about 'single product per page' or SPPs. I think section layouts or cut down product layouts are your way forward. Have a section per product and you can then place your fragments easily.

                            Comment


                              #15
                              you are going down the wrong route and need to be stopped while we have chance
                              Agreed on that one

                              Comment

                              Working...
                              X