I am trying to display the price of a optional "add-on" component but I am getting a coding error warning about using the AssociatedProduct:: ProductPriceRaw variable in the Standard Component Layout when I upload.
What's strange is that the error is only reported the first time Sellerdeck error checking runs after being launched (either through a manual check or an upload) and when you click on the error description to take you to the code the error warning disappears. Further error checking either manual or through uploads fail to find the error, but if I close Sellerdeck and re-open, the error will again be found on the first code check.
The code works correctly online and with both the inbuilt and offline previews.
I have tried a few ways of using the code and I always get the same error. Below are 2 examples
I apologise in advance if I have made a silly mistake but it would be great if anyone could point me in the right direct
Many thank
Toby
Example 1 (Note the variable "CurrentVatRate" is set globally as 1.2)
Example 2
What's strange is that the error is only reported the first time Sellerdeck error checking runs after being launched (either through a manual check or an upload) and when you click on the error description to take you to the code the error warning disappears. Further error checking either manual or through uploads fail to find the error, but if I close Sellerdeck and re-open, the error will again be found on the first code check.
The code works correctly online and with both the inbuilt and offline previews.
I have tried a few ways of using the code and I always get the same error. Below are 2 examples
I apologise in advance if I have made a silly mistake but it would be great if anyone could point me in the right direct
Many thank
Toby
Example 1 (Note the variable "CurrentVatRate" is set globally as 1.2)
Code:
<actinic:block php="true"> <actinic:block if="%3cactinic%3avariable%20name%3d%22IsUsedAssociatedProduct%22%20%2f%3e"> <actinic:block if="%3cactinic%3avariable%20name%3d%22HideComponentFullPrice%22%20%2f%3e%20%21%3d%20True"> <actinic:block if="%3cactinic%3avariable%20name%3d%22AssociatedProduct%3a%3aProductPriceRaw%22%20%2f%3e%20%20%3e0%2e01"> $rawprice = <actinic:variable name="AssociatedProduct::ProductPriceRaw" selectable="false" encoding="perl" />; $grossprice = round(($rawprice * <actinic:variable name="CurrentVatRate" selectable="false" encoding="perl" />),2); echo " (+ £$grossprice)"; </actinic:block> </actinic:block> </actinic:block> </actinic:block>
Example 2
Code:
<actinic:block php="true"> <actinic:block if="%3cactinic%3avariable%20name%3d%22IsUsedAssociatedProduct%22%20%2f%3e"> <actinic:block if="%3cactinic%3avariable%20name%3d%22HideComponentFullPrice%22%20%2f%3e%20%21%3d%20True"> <actinic:block if="%3cactinic%3avariable%20name%3d%22AssociatedProduct%3a%3aProductPriceRaw%22%20%2f%3e%20%20%3e0%2e01"> echo'(+ <actinic:block PHP='true' SELECTABLE='false'>formattedcurrency(round((<actinic:variable name="AssociatedProduct::ProductPriceRaw" selectable="false" encoding="perl" /> * <actinic:variable name="CurrentVatRate" selectable="false" encoding="perl" />), <actinic:variable name="CurrencyDigits" selectable="false" encoding="perl" />)*<actinic:variable name="ComponentQuantity" selectable="false" encoding="perl" />, <actinic:variable name="CurrencyDigits" selectable="false" encoding="perl" />, '<actinic:variable name="MoneyDecimalSeparator" selectable="false" encoding="perl" />', '<actinic:variable name="MoneyThousandSeparator" selectable="false" encoding="perl" />', '<actinic:variable name="DefaultCurrency" selectable="false" encoding="perl" />');</actinic:block> )'; </actinic:block> </actinic:block> </actinic:block> </actinic:block>
Comment