Announcement

Collapse
No announcement yet.

Displaying Text for each product group

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

    Displaying Text for each product group

    Hi

    I would like to be able to put some text next to the price for each product about the product group it is in.

    I have tried to use the variable ProductGroupID and Block if but I can not get it to work.

    The only other way I can think of is to create a variable with the 3 product groups I have and then use that variable in the Block if.

    Do any know a better way of doing it.
    Elliott - Weybridge Lights

    www.weybridgelights.co.uk

    #2
    If you can get the GroupID and you know which each one is, why not within your BlockIf (you'll need 3, one per group) just do:

    Blockif (groupid == 1)
    Group 1's name
    /Block

    Blockif (groupid == 2)
    Group 2's name
    /Block

    Blockif (groupid == 3)
    Group 3's name
    /Block

    Comment


      #3
      Hi Lee

      I did try that first but it did not work.

      This is coding I am using

      Code:
           <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductGroupID%22%20%2f%3e%20%20%3d%3d%205" >
      	    group 5
          </actinic:block>
          
           <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductGroupID%22%20%2f%3e%20%20%3d%3d%206">
      	    group 6
          </actinic:block>
          
           <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductGroupID%22%20%2f%3e%20%20%3d%3d%207" >
      	    group 7
          </actinic:block>
      Elliott - Weybridge Lights

      www.weybridgelights.co.uk

      Comment


        #4
        If you need to read up on blocks and blockifs

        Gabe's tutorials are a must-read, if you plan to use them

        Links to them HERE
        Tracey

        Comment


          #5
          Can you add productgroupid (isn't it groupID?) onto a product layout and it shows something?

          Comment


            #6
            Originally posted by leehack View Post
            Can you add productgroupid (isn't it groupID?) onto a product layout and it shows something?
            You can not use the variable ProductGroupID in the product layout.
            Elliott - Weybridge Lights

            www.weybridgelights.co.uk

            Comment


              #7
              Thats your problem then, you're trying to use something that has nothing in it and thus cannot be used in a blockif on a product layout.

              Comment


                #8
                You could query the database in php to return the ProductGroupID based on the contained ProductRef but to be honest using three variables is probably your best bet.

                Comment


                  #9
                  GroupId works fine for me and shows the text i'd want it to (on a product layout), looks like you are not doing it correctly.

                  Comment


                    #10
                    Hi

                    I was using ProductGroupID not GroupID. All working fine now.

                    What is ProductGroupID for????

                    Thanks for all your Help!!!!
                    Elliott - Weybridge Lights

                    www.weybridgelights.co.uk

                    Comment


                      #11
                      According to the Var Ref Help file the ProductGroupID is used for discount groups (marketing & checkout) - seems a very grey line between that and the GroupID mind.

                      Comment

                      Working...
                      X