Announcement

Collapse
No announcement yet.

A lil guidance please.

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

    A lil guidance please.

    Hello people of the actinic community.

    This is a 3 part question really. 1 working solution & 2 questions.

    Am looking for a lil guidance. I'm intending to apply a 'Was' 'Now' feel to my items within actinic which have a discount applied against them.

    I'm kind of OK with the PHP math side using actinic variable ProductRawPrice and have included where I'm at:

    <actinic:block if="<actinic:variable name="DiscountDescriptionIsShownForProducts" />">
    <actinic:block php="true">
    $vat = "1.2" ;
    $discountReward = 20 ;
    $strRawPrice = <actinic:variable encoding="perl" name="ProductPriceRaw" selectable="false" /> ;
    $intRawPrice = intval($strRawPrice) ;
    $discountPrice = number_format($intRawPrice - ($intRawPrice * $discountReward / 100), 2) ;
    $nowPrice = number_format($discountPrice * $vat, 2) ;
    echo $nowPrice ;
    </block>
    </block>

    Question 1: The above works fine as is, but is a manual entry of the $vat & $discountReward. The $vat I can live with, but is there any way I can use the actinic stored values for reward type & reward value to populate the $discountReward?

    Question 2: When an actinic variable referenced is in Italics what does this mean? Have tried to echo the actinic variable 'Adjustments' but can't appear to get this to output.

    Question 3: The ultimate aim of this 'Was' 'Now' activity is to somehow populate the google products feed 'sale_price' with the reduced 'Now' value. I have a field within the items (product) detail. How do I apply $nowPrice into this attribute simially to =Price: for Product Price Description.

    Sorry to ask... Am sure it's been covered... somwhere... however have looked far and wide but found very little beyound creating a variable and populating it manually. -Perhaps it's not even possible to pull that information out.

    Thanks.

    #2
    Sharing what I'VE discovered

    I have since resolved a lot of the above. As opposed to getting access to the stored values within the *rewards* section built into actinic (Apparently nie impossible!), I've created new product layouts (E.g. 30% sale) to address the various reductions (value & percentage) to price and have displayed with a lil reworked CSS. At main section level I have changed the product layout to that of the reduction required (30% sale)... So it works.

    * ~ ~ A point of advice. When changing the layout of the product as I have, any changes applied to actinic styles (e.g. image-product) will have an effect on not only the image within the product layout, but also the images within the above section/s... Best copy the actinic (image-product) css: rename, restyle within the css file then replace the syle within the layout with the revised.

    I am still interested in knowing if anyone has a way in which to populate the sale_price google data feed with a recalculate / reduced price?!

    Thanks.

    Comment

    Working...
    X