Announcement

Collapse
No announcement yet.

Product price in fragment code

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

    Product price in fragment code

    Hi All,
    I am working on a new site where the client wants a hero slider on the front page, which displays the prime products.

    Ideally I would like to have the current price of the particular product displayed on the appropriate slider.

    However I have no idea if it is possible to get the price for a specific product & display it within frgament code? ie within !!< >!! tags in the fragment text field?

    thanks,
    Jan
    Freelance web design
    www.rebelit.co.uk

    #2
    Use one of the new product or best sellers list available on the home page to make your life easy.

    Comment


      #3
      I've done an add-on "SliderLists" that displays Also Bought, Best Sellers, New Products and Related Products in a slideshow. And also allows up to 10 custom slides to be displayed.

      See http://community.sellerdeck.com/showthread.php?t=53765 (post #3) for more info and demo links.

      It uses BxSlider.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Hi all,
        Thanks for those replies.

        I already have the slider implemented and I know it would also be easy enough to move that into the page template if need be.

        However I still would like to know if it is possible - even if it is difficult, or impossible to reference product (or other) variables from a fragment (or description) text box?

        The more I think about it, the more I think it is probably not possible.
        Freelance web design
        www.rebelit.co.uk

        Comment


          #5
          Re getting product details into a Fragment. If this is for the Brochure type pages, then you'll have to embed some serious PHP / SQL code that uses the Product ID and then looks up the relevant info. See http://community.sellerdeck.com/showthread.php?t=49736 for something similar.

          If it's for Section pages, then it's much easier. Don't use a Fragment, but instead use a custom Product Layout made to look like a Fragment.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Originally posted by NormanRouxel View Post
            Re getting product details into a Fragment. If this is for the Brochure type pages, then you'll have to embed some serious PHP / SQL code that uses the Product ID and then looks up the relevant info. See http://community.sellerdeck.com/showthread.php?t=49736 for something similar.

            If it's for Section pages, then it's much easier. Don't use a Fragment, but instead use a custom Product Layout made to look like a Fragment.
            Hi Norman,
            yes it was for the brochure page. Thanks for the link I'm going to examine that more thoroughly for future projects.

            However looking at the complexity involved in the solution it is more trouble than it is worth for this particular project..

            There are very few products on this site & the hero slider will only feature a static set of three. Since the client doesn't even like to change prices themselves, I can hard code them and simply update the code if they need the prices changing.

            Cheers,
            Jan
            Freelance web design
            www.rebelit.co.uk

            Comment


              #7
              I'd create a product level "Yes/No" variable called "UseInHomePageSlider" or something equivalent.
              I'd then create a bespoke fragment layout to house the slider. This fragment layout code will contain conditions that loop through the entire product list and spit out relevant product info where a product's variable is flagged as "Yes".

              Something like:

              Code:
              <actinic:block type="EntireSectionList" >
                  <actinic:block type="ProductList" >
                      <actinic:block if="%3cactinic%3avariable%20name%3d%22UseInHomePageSlider%22%20%2f%3e%20%3d%3d%20%22Yes%22" >
                        [product variables/html info here]
                      </actinic:block>
                      
                  </actinic:block>
              </actinic:block>
              Fergus Weir - teclan ltd
              Ecommerce Digital Marketing

              SellerDeck Responsive Web Design

              SellerDeck Hosting
              SellerDeck Digital Marketing

              Comment


                #8
                Originally posted by fergusw View Post
                I'd create a product level "Yes/No" variable called "UseInHomePageSlider" or something equivalent.
                I'd then create a bespoke fragment layout to house the slider. This fragment layout code will contain conditions that loop through the entire product list and spit out relevant product info where a product's variable is flagged as "Yes"....
                Well when you put it like that it does seem a really obvious solution doesn't it. I will probably give this a try in a day or two. Thanks.
                Freelance web design
                www.rebelit.co.uk

                Comment


                  #9
                  I'd have suggested that but it probably won't work due to this bug http://community.sellerdeck.com/showthread.php?t=54029
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Good catch Norman. I missed that this was in 2013 forum.......

                    Yes - this will work......but only once V12.0.2 has been released with that particular bug patched. Until then Norman's New products/best selllers list would be best measure.
                    You could adapt a method to selectively choose which items appear from the New Products/Best sellers list
                    see here: http://community.sellerdeck.com/showthread.php?t=30816
                    Fergus Weir - teclan ltd
                    Ecommerce Digital Marketing

                    SellerDeck Responsive Web Design

                    SellerDeck Hosting
                    SellerDeck Digital Marketing

                    Comment

                    Working...
                    X