dotnetnuke - Google e-commerce Scripts for Hotcakes e-commerce module -


i using hotcakes e-commerce tools website. website using dnn platform.

because have 2 different websites , products need track google e-commerce, therefore need 2 set of google e-commerce code.

one ga('ecommerce:send'); fine, other 1 has ga('hatch.ecommerce:send');

however hotcakes not allow me modify google e-commerce code. have turn off , edit myself view model

i have implemented code causes view error on page.

can me issue?

it gave error message “an error has occurred. error: checkout unavailable.”

this code “receipt.cshtml”. have added near bottom google e-commerce code:

@model hotcakes.modules.core.models.orderviewmodel <div class="hc-receipt"> <h2>thank purchasing</h2> know love creating beautiful embroidery designs our hatch products.<br /><br /> <a href="https://dyul59n6ntr4m.cloudfront.net/hatch_setup.exe">click here download hatch embroidery</a><br /><br /> <strong>you not required download hatch if purchased:</strong> <ul> <li>additional hatch add-ons</li> <li>an upgrade embroidery creator or embroidery digitizer</li> <li>hatch fonts packs</li> </ul> restart software new purchase available.<br /> have fun , please share creations on our <a href="https://www.facebook.com/wilcom" target="new">facebook page</a><br /> @html.partial("_setfirstpassword") @html.partial("_vieworder", model) @for (int = 0; < model.items.count(); i++) { var item = model.items.elementat(i); @item.productname <span>@item.productsku</span><br /> **<script type="text/javascript"> ga('hatch.ecommerce:addtransaction', { 'id': '149428', 'affiliation': 'hatch embroidery online shop', 'revenue': '0', 'shipping': '0', 'tax': '@model.localorder.totaltax', 'city': '@model.localorder.billingaddress.city', 'state': '@model.localorder.billingaddress.regiondisplayname', 'country': '@model.localorder.billingaddress.countrydisplayname' }); ga('hatch.ecommerce:additem', { 'id': '@item.id', 'name': '@item.productname', 'sku': '@item.productsku', 'category': 'hatch product', 'price': '@item.adjustedpriceperitem', 'quantity': '@item.quantity' }); ga('hatch.ecommerce:send'); </script>**  } </div> 

i figured has inside loop if customer buying multiple products…. great if can give hint or this….. jack

in looking @ code, there appeared typo's in "model" versus "model", additional spaces , characters in script tag, , product name wasn't being used correctly in way razor expects use it. i'm not sure if fix of issues encountered, appeared razor syntax , typo issues far.

@model hotcakes.modules.core.models.orderviewmodel <div class="hc-receipt">     <h2>thank purchasing</h2>     know love creating beautiful embroidery designs our hatch products.<br /><br />     <a href="https://dyul59n6ntr4m.cloudfront.net/hatch_setup.exe">click here download hatch embroidery</a><br /><br />     <strong>you not required download hatch if purchased:</strong>     <ul>         <li>additional hatch add-ons</li>         <li>an upgrade embroidery creator or embroidery digitizer</li>         <li>hatch fonts packs</li>     </ul>     restart software new purchase available.<br />     have fun , please share creations on our <a href="https://www.facebook.com/wilcom" target="new">facebook page</a><br />     @html.partial("_setfirstpassword")     @html.partial("_vieworder", model)     @for (int = 0; < model.items.count(); i++)     {         var item = @model.items.elementat(i);         <text>@item.productname</text>         <span>@item.productsku</span><br />         <script type="text/javascript">             ga('hatch.ecommerce:addtransaction', {                 'id': '149428',                 'affiliation': 'hatch embroidery online shop',                 'revenue': '0',                 'shipping': '0',                 'tax': '@model.localorder.totaltax',                 'city': '@model.localorder.billingaddress.city',                 'state': '@model.localorder.billingaddress.regiondisplayname',                 'country': '@model.localorder.billingaddress.countrydisplayname'             });             ga('hatch.ecommerce:additem', {                 'id': '@item.id',                 'name': '@item.productname',                 'sku': '@item.productsku',                 'category': 'hatch product',                 'price': '@item.adjustedpriceperitem',                 'quantity': '@item.quantity'             });             ga('hatch.ecommerce:send');         </script>     } </div> 

Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -