Announcement

Collapse
No announcement yet.

related products in sidebar layout

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

    related products in sidebar layout

    i have my related products showing in the right sidebar. at the moment, each item is displayed inside its own box and header called 'relative products'. can somebody please tell me how to edit the code so that if there is more than 1 item, they will be displayed within the same box and so i get only 1 header? if you look at the following url you'll know what i mean (i think )

    http://www.derekbooth.co.uk/polesand...Pole_Set_.html

    at the moment, my smart right sidebar code looks like this:



    <actinic:variable name="ShoppingCartSummary" value="Shopping Cart Summary In Box" />
    <actinic:variable name="CustomSidebarBox" value="Right Custom Sidebar Box" />
    <actinic:variable name="CouponEntryField" value="Sidebar Coupon Field" if="%3cactinic%3avariable%20name%3d%22CaptureCoupon%22%20%2f%3e" />

    <actinic:block type="ProductList">
    <actinic:block type="RelatedProductsList">
    <div class="sidebox" style="width:150px">
    <div class="boxhead"><h2>Relative Products</h2></div>
    <div class="boxbody">
    <actinic:variable name="ProductRelatedProductsItem" />
    </div>
    </div>
    <br/>
    </actinic:block>
    </actinic:block>



    thank you everybody

    tony.

    #2
    The boxhead and boxbody need to be outside the blockifs. Try something like this (untested):

    Code:
    <div class="sidebox" style="width:150px">
    <div class="boxhead"><h2>Relative Products</h2></div>
    <div class="boxbody">
    
    <actinic:block type="ProductList">
    <actinic:block type="RelatedProductsList">
    <actinic:variable name="ProductRelatedProductsItem" />
    <br/>
    </actinic:block>
    </actinic:block>
    
    </div>
    </div>

    Comment


      #3
      I would check your network settings as your URL doe not look right to me unless you are just testing

      Comment


        #4
        yeah thats ok malcolm, just testing, thats not the real url.

        Comment


          #5
          thank you very much for helping me duncan. i followed your suggestion and i'm almost there. my problem now is: if i click on a product without any upsell, an empty box is displayed. i'm guessing i now need an if statement to stop that from happening? any ideas on the code i would need?

          Comment


            #6
            Test if the ProductRelatedProductsItem is not equal (or equal) to """" i.e. is empty or not. Place that around the whole lot to stop the sidebar completely.

            Comment


              #7
              Slightly off topic i know Tony but is the term 'Relative Products' the right one here? - wouldn't 'Related Products' be the correct heading?
              The Pretty Dress Company

              Comment


                #8
                Or "You might be interested in these items too"

                Amazon uses "Perfect Partners" which i think is psychologically better phasing too.

                but defo "relative" is grammatically incorrect, unless you are offering your grandma for sale

                Comment


                  #9
                  ok ok......related it is, but i still need help.

                  duncan, you suggested i test "ProductRelatedProductsItem" for being empty or not. i have tried this but it doesn't work. i used this code:

                  ProductRelatedProductsList != ""

                  also, if i try selecting it from the list instead of typing it in, there's no such thing as "ProductRelatedProductsList"

                  obviously i'm doing something wrong, any ideas anybody?

                  Comment

                  Working...
                  X