Announcement

Collapse
No announcement yet.

Including variables into product description

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

    Including variables into product description

    Hiya

    We've created a new variable which we've (inventively) called 'Reviews'

    What this does is place some text into the design to call up a popup window that allows a user to enter a review of an item which is then emailed off to the site owner for checking and posting onto the site.

    We've referenced this variable in the product description area as

    Code:
    !!<<actinic:variable name="Reviews" />>!!
    When we apply this, Actinic changes this to read

    Code:
    !!<[Reviews]>!!
    and correctly adds the layout content into the generated page.

    Why can't we then just insert what Actinic converts the variable into (i.e. [Reviews]) into the description for it to work?

    If we do this, it simply outputs that word with the square brackets round it into the description.

    Any ideas?

    Thanks
    Thanks

    Jos Medinger

    Tel : 01978 843 962
    www.internetology.co.uk
    Actinic / E-Commerce Hosting, Design & SEO
    ______________________________________

    #2
    Try it without the !!< and >!! - i.e. just [Reviews].
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Norman

      I tried that to start off with and it just included the source code from the layout.

      I put the 'HTML include' comments in which prevented this and made it display correctly.

      I guess the question is "Why does it convert the code to [Reviews] going one way - but not the other"?
      Thanks

      Jos Medinger

      Tel : 01978 843 962
      www.internetology.co.uk
      Actinic / E-Commerce Hosting, Design & SEO
      ______________________________________

      Comment


        #4
        If I (using 8.5.0) just put a Variable name within square brackets e.g. [CartButtonText] into a product description with no surrounding !!< or >!!, then it is replaced with the contents of that Variable (Add to Cart appears). Try it and see.

        Is your Reviews item a Variable or a Layout?
        Norman - www.drillpine.biz
        Edinburgh, U K / Bitez, Turkey

        Comment


          #5
          It's a layout containing the following content
          Code:
          <a href="javascript:popUp('http://www.sitename.com/acatalog/review_popup.php?ref=<actinic:variable name="ProductReference" />&item=<actinic:variable name="ProductName"/>', 430, 430)">Click here to write your own review of this item</a>
          Thanks

          Jos Medinger

          Tel : 01978 843 962
          www.internetology.co.uk
          Actinic / E-Commerce Hosting, Design & SEO
          ______________________________________

          Comment


            #6
            This seems to no longer work in v18. Has anyone any ideas or similar experience?

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

            Comment


              #7
              Works fine in my 18.0.4. E.g. I put [ProductID] into a product description and it displayed the ID. And works the same for user defined variables.

              It works with or without !!< and >!! around the text.

              If you're putting a Layout in you have to use the layout selectors name and enclose it in !!< and >!! as you want the raw HTML to be included.
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Ah ha.

                It works in product descriptions but not in section descriptions


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

                Comment


                  #9
                  Yes. Only in Product Description. Not in Product Name, Section Name, Section Description, Extended Info Text, etc. That's been the case since V8 came out.
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment

                  Working...
                  X