Announcement

Collapse
No announcement yet.

Displaying "POA" when no price available

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

    #16
    We / you can't see the BlockIf code as it happens on your desktop. Try putting in some visible display of the variable before you use it.
    E.g.

    RAW IS: <actinic:variable name="ProductPriceRaw" />
    BlockIf
    Button Code
    /Blockif
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #17
      This is interesting on the example page where the button is showing:

      RAW IS: 30
      Mike
      -----------------------------------------

      First Tackle - Fly Fishing and Game Angling

      -----------------------------------------

      Comment


        #18
        Originally posted by Mike Hughes View Post
        This is interesting on the example page where the button is showing:



        Mike
        Mike I added some display code as per Normans recommendation to display the RAWPRICE Value. Now after having done this, here is an example of one product plus a duplicate.
        The Original displays - NO PRICE RAW IS:0 http://www.cartridgesonline.co.za/ac...tylus_200.html

        The Duplicate displays - RAW IS: 30 with ADDTOCART button http://www.cartridgesonline.co.za/ac...Color_IIs.html

        Original is set to Price = 0, hence so is the duplicate.
        If you "Click for More..." on the duplicate and it loads the product, it dipslays NO PRICE RAW IS:0
        So it seems the Section that houses the duplicate product is where the "error" is.
        Adrian Boshoff
        http://www.servatech.co.za

        Comment


          #19
          OK so the problem seems to be with "Reset all Duplicates".

          The question that has been asked many times on the Forum is that is there a way to reset the duplicates on all products rather than manually per product (this is not an option that I can do - too many products) and I haven't been able to find an answer??
          Adrian Boshoff
          http://www.servatech.co.za

          Comment


            #20
            Originally posted by NormanRouxel View Post
            We / you can't see the BlockIf code as it happens on your desktop. Try putting in some visible display of the variable before you use it.
            E.g.

            RAW IS: <actinic:variable name="ProductPriceRaw" />
            BlockIf
            Button Code
            /Blockif
            Norman,
            I read on an earlier post that ProductPriceRaw has a problem updating in duplicates on this post.
            http://community.sellerdeck.com/showthread.php?p=306621
            I need to use ProductPriceRaw in my AddToCart Layout as per previous post but now am totally lost. I tried using Mediamoles Product Duplicates Tool but that didn't help as it doesn't affect ProductPriceRaw.
            So the ProductPriceRaw is often incorrect in duplicates makinf the above code of no use?
            Adrian Boshoff
            http://www.servatech.co.za

            Comment


              #21
              Which means you should probably use the hack from Norman that's in the link you just gave.

              Mike
              -----------------------------------------

              First Tackle - Fly Fishing and Game Angling

              -----------------------------------------

              Comment


                #22
                Originally posted by NormanRouxel View Post
                Sample code using a BlockIf and the ProductPriceRaw variable:
                Code:
                <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPriceRaw%22%20%2f%3e%20%3d%3d%200">
                	NO PRICE
                </actinic:block>
                
                <actinic:block if="%3cactinic%3avariable%20name%3d%22ProductPriceRaw%22%20%2f%3e%20%21%3d%200" >
                	HAS PRICE
                </actinic:block>
                Mike, I guess what I am trying to do is use Norman's hack in the above example which uses the variable ProductPriceRaw. How would one use it to replace the variable?
                Adrian Boshoff
                http://www.servatech.co.za

                Comment


                  #23
                  It looks to me as if Norman's block of code creates a variable $prprice that can be used as an alternative to ProductPriceRaw:

                  <actinic:block php="true">
                  $prprice = 0;
                  <actinic:block type="PriceList" />
                  <actinic:block if="%3cactinic%3avariable%20name%3d%22ListIndex%22%20%2f%3e%20%3d%3d%201" >
                  $prprice = preg_replace('/[^0-9]/','','<actinic:variable name="TaxExclusivePrice" encoding="perl" selectable="false" />');
                  $prprice = $prprice / pow(10, <actinic:variable name="CurrencyDigits" />);
                  </actinic:block>
                  </actinic:block>
                  echo $prprice;
                  </actinic:block>
                  As it's in PHP you'll need to replace the Actinic blockif with the PHP equivalent.

                  I.e. Replace the line in the code above that says #echo $prprice; with something along the lines of:

                  if ($prprice == 0)
                  {
                  echo "No Price";
                  }
                  else
                  {
                  echo "Has Price";
                  }
                  Mike
                  -----------------------------------------

                  First Tackle - Fly Fishing and Game Angling

                  -----------------------------------------

                  Comment


                    #24
                    Hi MIke,

                    Is there anyway of achieving the following using your code?

                    if ($prprice == 0)
                    {
                    echo "><b>PRICE ON APPLICATION"</b>;
                    }
                    else
                    {
                    echo "<actinic:block if="%3cactinic%3avariable%20name%3d%22CartButtonVisibleToAllCustomers%22%20%2f%3e" >
                    <!-- This code is used when the cart button is visible to all customers -->
                    <span class="button-wrapper cart-button-wrapper"><input value="<Actinic:Variable Name="CartButtonText"/>" name="_<Actinic:Variable Name="ProductID"/>" type="submit" class="button cart-button" /></span>
                    </actinic:block> ";
                    }

                    So I have used a bit of HTML etc combined with PHP??? - obviously I am not a programmer.
                    I want the code to run some HTML if the price is zero or alternatively to display the ADD TO Cart button.
                    I looked for the variable that Norman's code creates but wasn't able to find it.

                    Adrian Boshoff
                    http://www.servatech.co.za

                    Comment


                      #25
                      Originally posted by Mike Hughes View Post
                      It looks to me as if Norman's block of code creates a variable $prprice that can be used as an alternative to ProductPriceRaw:



                      As it's in PHP you'll need to replace the Actinic blockif with the PHP equivalent.

                      I.e. Replace the line in the code above that says #echo $prprice; with something along the lines of:



                      Mike
                      If, as Mike says, Normans bit of code creates a new variable, namely $prprice, I cannot see it as a variable in the Design Library??
                      I am not sure then how I can use this variable.
                      I am so close but this last hurdle is holding the launch of my new site.
                      Any help is appreciated.
                      Adrian Boshoff
                      http://www.servatech.co.za

                      Comment


                        #26
                        Try:
                        Code:
                        if ($prprice == 0)
                        	{
                        	echo '<b>PRICE ON APPLICATION</b>';
                        	}
                        else
                        	{
                        	echo '<actinic:block if="%3cactinic%3avariable%20name%3d%22CartButtonVisibleToAllCustomers%22%20%2f%3e" ><span class="button-wrapper cart-button-wrapper"><input value="<Actinic:Variable Name="CartButtonText" encoding="perl" selectable="false" />" name="_<Actinic:Variable Name="ProductID" encoding="perl" selectable="false"/>" type="submit" class="button cart-button" /></span></actinic:block> ';
                        	}
                        It works here.
                        Norman - www.drillpine.biz
                        Edinburgh, U K / Bitez, Turkey

                        Comment


                          #27
                          Thanks once again Norman, problem solved...
                          Adrian Boshoff
                          http://www.servatech.co.za

                          Comment

                          Working...
                          X