Announcement

Collapse
No announcement yet.

Rakuten Tracking Pixel Help

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

    Rakuten Tracking Pixel Help

    We are launching with Rakuten Affiliate and need to implement their tracking pixel. I have the majority working but running into an issue with outputing the Discount amounts assigned to an order. I also need the discount value to output in pennies, which is why you'll see the pennies equation that I copied from the product value output (which works great on that section).

    When an order has a coupon code assigned, I need to display the value of only the discounts on the order. So if a coupon code with $55.50 is assigned, it should output only 5500.

    Right now the below code outputs: 0|0|0 no matter if there is a discount applied to the order or not.

    How do I get the below code to output the correct discount value and only assigned discounts?

    Here is the code I am having issues with:
    Code:
    <mvt:assign name="l.counter" value="0" /><mvt:foreach iterator="charge" array="order:charges"><mvt:if expr="l.settings:charge:type NE 'TAX' OR l.settings:charge:type NE 'SHIPPING'"><mvt:assign name="l.settings:charge:discount_pennies" value="l.settings:charge::formatted_disp_amt * 100" />|&mvt:charge:discount_pennies;</mvt:if></mvt:foreach>

    Here is my full tracking pixel code:
    Code:
    <!-- Rakutan Tracking Pixel --> <mvt:foreach iterator="charge" array="order:charges">
    <mvt:if expr="l.settings:charge:type NE 'TAX' OR l.settings:charge:type NE 'SHIPPING'">
       <mvt:assign name="g.order_discount" value="'true'" />
    </mvt:if>
    </mvt:foreach>
    
    <img src='https://track.linksynergy.com/ep?mid=42089&ord=&mvt:order:id;&skulist=<mvt:assign name="l.counter" value="0" /><mvt:foreach iterator="item" array="order:items"><mvt:assign name="l.counter" value="l.counter + 1" /><mvt:if expr="l.counter GT 1">|</mvt:if>&mvt:item:code;</mvt:foreach><mvt:if expr="g.order_discount EQ 'true'">|Discount</mvt:if>&qlist=<mvt:assign name="l.counter" value="0" /><mvt:foreach iterator="item" array="order:items"><mvt:assign name="l.counter" value="l.counter + 1" /><mvt:if expr="l.counter GT 1">|</mvt:if>&mvt:item:quantity;</mvt:foreach><mvt:if expr="g.order_discount EQ 'true'">|0</mvt:if>&amtlist=<mvt:assign name="l.counter" value="0" /><mvt:foreach iterator="item" array="order:items"><mvt:assign name="l.counter" value="l.counter + 1" /><mvt:if expr="l.counter GT 1">|</mvt:if><mvt:assign name="l.settings:item:price_pennies" value="l.settings:item:price * 100" />&mvt:item:price_pennies;</mvt:foreach><mvt:assign name="l.counter" value="0" /><mvt:foreach iterator="charge" array="order:charges"><mvt:if expr="l.settings:charge:type NE 'TAX' OR l.settings:charge:type NE 'SHIPPING'"><mvt:assign name="l.settings:charge:discount_pennies" value="l.settings:charge::formatted_disp_amt * 100" />|&mvt:charge:discount_pennies;</mvt:if></mvt:foreach>&cur=USD&namelist=<mvt:assign name="l.counter" value="0" /><mvt:foreach iterator="item" array="order:items"><mvt:assign name="l.counter" value="l.counter + 1" /><mvt:if expr="l.counter GT 1">|</mvt:if>&mvt:item:name;</mvt:foreach><mvt:if expr="g.order_discount EQ 'true'">|Discount</mvt:if>' border="0" width="1px" height="1px" alt="">
    <!-- End Rakutan Tracking Pixel -->

    #2
    Assuming you are using the built in coupon functionality and the theme/version in use, there should already be a foreach loop for obtaining coupons assigned to the order or you can add it if not. You can add something like the following to add up the values:

    Code:
    <mvt:foreach iterator="coupon" array="order:coupons">
    <mvt:assign name="l.settings:total_coupons" value="l.settings:total_coupons + l.settings:coupon:total" />
    </mvt:foreach>
    
    &mvt:total_coupons;
    Just a loose example, hopefully it helps.

    Comment


      #3
      Thanks for your response Dan. We are Sebenza Ultimate Coupons. I would assume coupon/discount values would still exist on the order header level despite which module is used.

      Is there any documentation you know about that can tell me the variables available such as the above? The MIVA documentation makes no reference to order:coupons when I try to search it.

      I'm not trying to get a count of coupons, but loop through each coupons discount value applied to the order. The same value shown in the checkout process and on the order receipt page once the coupon is applied.

      Comment

      Working...
      X