Anyone get the Share A Sale Plugin to work?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
9 years ago
Hey all, I'm trying to implement shareasale on my site. I've followed the instructions for the plugin, but it keeps passing $0 as my sale amount?

Anyone know what I'm doing wrong?  

here are the instructions:



One pixel integration for your website.
1. Open or create new file in your theme Themes/../Views/Checkout/Completed.cshtml
2. After row
  Html.AddTitleParts(T("PageTitle.Checkout").Text);
   add new line
    var order = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Services.Orders.IOrderService>().GetOrderById(Model.OrderId);
3. In the end of above file add
   <!--Shareasale-->
   <img src="//shareasale.com/[email protected](order.OrderTotal, 2)&[email protected]&transtype=sale&merchantID=[54105]" width="1" height="1" />



Here is the code on my Completed.cshtml

[code]

@model CheckoutCompletedModel
@using Nop.Web.Models.Checkout;
@{
    Layout = "~/Views/Shared/_ColumnsOne.cshtml";

    //title
    Html.AddTitleParts(T("PageTitle.Checkout").Text);
  var order = Nop.Core.Infrastructure.EngineContext.Current.Resolve<Nop.Services.Orders.IOrderService>().GetOrderById(Model.OrderId);
}
<div class="page checkout-page">
    @if (!Model.OnePageCheckoutEnabled)
    {
        @Html.Action("CheckoutProgress", "Checkout", new { step = CheckoutProgressStep.Complete })
    }
    <div class="page-title">
        <h1>@T("Checkout.ThankYou")</h1>
    </div>
    <div class="page-body checkout-data">
        @Html.Widget("checkout_completed_top")
        <div class="section order-completed">
            <div class="title">
                <strong>@T("Checkout.YourOrderHasBeenSuccessfullyProcessed")</strong>
            </div>
            <ul class="details">
                <li>
                    @T("Checkout.OrderNumber"): @Model.OrderId
                </li>
                <li>
                    <a href="@Url.RouteUrl("OrderDetails", new { orderID = Model.OrderId })">@T("Checkout.PlacedOrderDetails")</a>
                </li>
            </ul>
            <div class="buttons">
                <input type="button" value="@T("Checkout.ThankYou.Continue")" class="button-2 order-completed-continue-button" onclick="setLocation('@Url.RouteUrl("HomePage")')" />
            </div>
        </div>
        @Html.Widget("checkout_completed_bottom")
    </div>
</div>
   <!--Shareasale-->
   <img src="//shareasale.com/[email protected](order.OrderTotal, 2)&[email protected]&transtype=sale&merchantID=[myid]" width="1" height="1" />


[/code}
9 years ago
The integration seems simple enough and there is nothing wrong with at least not on the first look of it.
Can you paste what the src attribute of the <img> tag points to on a sample order?

The only possible reason I can see why this might be happening is if you Order.TotalAmount is less than $0.5.
But I would assume this is not the case.
9 years ago
thanks guys, the issue was the [] around my merchant ID, those shouldn't be there.  I got it working THANKS!!!
8 years ago
I appreciate you guys posting this solution. It allowed me to test the Shareasale tracking pixel.

However, in the sample above you are passing the Order Total so, you are also paying commission on the shipping cost.

If we wanted to pass the SubTotal amount, what would be the variable for this?

Thanks!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.