Een functierijke winkelwagensoftware die alles bevat wat u nodig hebt om uw online winkel te starten, uit te voeren en te promoten.
Deze integratiemethode helpt u Post Affiliate Pro te integreren met Interspire Shopping Cart 6.0+ in het geval dat klanten na betaling met Google Checkout niet worden geretourneerd op de Interspire-bedankpagina.
Waar is dit script voor?
Deze instelling is gemaakt om producten te volgen die zijn besteld in InterspireShopping Cart en betaald met Google Checkout. Wat dit script doet, is dat het elk afzonderlijk besteld product als een afzonderlijke verkoop naar PAP4 of een hele winkelwagen als een eenmalige verkoop plaatst. Voor verkooptracking wordt PAP API-tracking gebruikt.
Veld bezoekerId toevoegen aan ProductAddToCart-sjabloon
Voeg deze rij toe aan het formulier:
<input value="" name="product-private-data" type="hidden" id="pap_dx8vc2s5">
na rij:
<input type="hidden" name="currency_id" value="" />
en voeg na het einde van de formuliertag “” toe:
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript">
</script>
%%GLOBAL_AddToCartButtonControlScript%%
<form method="post" action="%%GLOBAL_CartLink%%" onsubmit="return check_add_to_cart(this, %%GLOBAL_ProductOptionRequired%%)" enctype="multipart/form-data">
<input type="hidden" name="action" value="add" />
<input type="hidden" name="product_id" value="%%GLOBAL_ProductId%%" />
<input type="hidden" name="variation_id" class="CartVariationId" value="" />
<input type="hidden" name="currency_id" value="" />
<input value="" name="product-private-data" type="hidden" id="pap_dx8vc2s5">
<div class="ProductDetailsGrid ProductAddToCart">
%%SNIPPET_ProductFieldsList%%
<div class="ProductOptionList">
%%SNIPPET_VariationList%%
</div>
%%SNIPPET_EventDate%%
<div class="DetailRow" style="display: %%GLOBAL_DisplayAdd%%">
<div class="Label QuantityInput" style="display: %%GLOBAL_DisplayAddQty%%">%%LNG_QuantityFull%%:</div>
<div class="Value AddCartButton">
<span class="FloatLeft" style="display: %%GLOBAL_DisplayAddQty%%;">
%%GLOBAL_AddToCartQty%%
</span>
<div class="BulkDiscount">
%%GLOBAL_AddToCartButtonOptimizerScriptTag%%
<input type="image" src="%%GLOBAL_IMG_PATH%%/%%GLOBAL_SiteColor%%/AddCartButton.gif" alt="Interspire Shopping Cart(speciaal voor Google Checkout)"/>
%%GLOBAL_AddToCartButtonOptimizerNoScriptTag%%
<div class="BulkDiscountLink" style="display: %%GLOBAL_HideBulkDiscountLink%%;">
<a href="#" onclick="$.iModal({data: $('#ProductDetailsBulkDiscountThickBox').html(), width: 600}); return false;">
%%LNG_BulkDiscountLink%%
</a>
</div>
</div>
</div>
</div>
</div>
</form>
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/notifysale.php" type="text/javascript">
</script>
<div class="OutOfStockMessage">
%%SNIPPET_SideAddItemSoldOut%%
</div>
%%GLOBAL_ProductBulkDiscountThickBox%%
<script type="text/javascript">
lang.OptionMessage = "%%GLOBAL_OptionMessage%%";
lang.VariationSoldOutMessage = "%%LNG_VariationSoldOutMessage%%";
lang.InvalidQuantity = "%%LNG_InvalidQuantity%%";
lang.EnterRequiredField = "%%LNG_EnterRequiredField%%";
lang.InvalidFileTypeJS = "%%LNG_InvalidFileTypeJS%%";
var ShowAddToCartQtyBox = "%%GLOBAL_ShowAddToCartQtyBox%%";
</script>
%%GLOBAL_EventDateJavascript%%
VisitorId-parameter toevoegen aan Toevoegen aan winkelwagentje-links
En voeg toe aan de trackingcode voor klikken:
PostAffTracker.writeCookieToLink('affCookieLinkId', 'product-private-data');
na regel:
PostAffTracker.track();
Onderstaande code laat zien dat na wijzigingen:
<div class="ProductActionAdd" style="display:%%GLOBAL_HideActionAdd%%;">
<a href="%%GLOBAL_ProductURL%%" id="affCookieLinkId">%%GLOBAL_ProductAddText%%</a>
</div>
- BrandProductsItem.html
- CategoryProductsItem.html
- HomeFeaturedProductsItem.html
- HomeNewProductsItem.html
- HomeSaleProductsItem.html
- ProductVendorsOtherProductsItem.html
- SearchResultProductGrid.html
- SideCategoryNewProducts.html
- SideCategoryPopularProducts.html
- SideCategoryTopSellers.html
- SideNewProducts.html
- SideRecentlyViewedProducts.html
- SideTopSellers.html
- SideTopSellersFirst.html
- TagProductsItem.html
- VendorFeaturedItemsItem.html
- VendorProductsItem.html
Edit file class.cart.api.php
Zoek lijn:
public function AddItem
Het zal er als volgt uitzien:
public function AddItem($productId, $quantity=1, $variationDetails=null, $configurableOptions=array(), $cartItemId=null, $options=array(), $parentId=null, $reorder=false, $productPrivateData=null)
Zoek vervolgens naar winkelwagenProductarray (regel 1319):
$cartProduct = array(
'product_id' => $productId,
'variation_id' => $variation,
'options' => $variationOptions,
'quantity' => $quantity,
'product_name' => $product['prodname'],
'product_code' => $productCode,
'product_price' => $productPrice,
'original_price' => $originalPrice,
'default_currency' => $defaultCurrency['currencyid'],
'customer_group' => $customerGroup,
);
voeg daar toe:
product_private_data' => $productPrivateData
het zal eruit zien als:
$cartProduct = array(
'product_id' => $productId,
'variation_id' => $variation,
'options' => $variationOptions,
'quantity' => $quantity,
'product_name' => $product['prodname'],
'product_code' => $productCode,
'product_price' => $productPrice,
'original_price' => $originalPrice,
'default_currency' => $defaultCurrency['currencyid'],
'customer_group' => $customerGroup,
'product_private_data' => $productPrivateData
);
Bewerk bestand class.cart.php
Zoek lijn:
$cartItemId = $this->api->AddItem($product_id, $qty, $variation, $configurableFields, null, $options, null, false);
verander het als:
$cartItemId = $this->api->AddItem($product_id, $qty, $variation, $configurableFields, null, $options, null, false, $productPrivateData);
En voeg dit ervoor toe:
$productPrivateData = '';
if(isset($_REQUEST['product-private-data'])) {
$productPrivateData = $_REQUEST['product-private-data'];
}
Het zorgt voor wijzigingen:
...
...
$options['EventName'] = $eventName;
}
$productPrivateData = '';
if(isset($_REQUEST['product-private-data'])) {
$productPrivateData = $_REQUEST['product-private-data'];
}
// Actually add the product to the cart
$cartItemId = $this->api->AddItem($product_id, $qty, $variation, $configurableFields, null, $options, null, false, $productPrivateData);
$this->newCartItem = $cartItemId;
if($cartItemId === false) {
...
...
Verkoop-trackingcode toevoegen aan bestand class.handler.php in googlecheckout-methode
Zoek deze code rond regel 925:
if (!$completed) {
$GLOBALS['ISC_CLASS_LOG']->LogSystemError($this->logtype, sprintf(GetLang('GoogleCheckoutCantCompleteOrder'), isc_html_escape($pendingToken), isc_html_escape(var_export($completed, true))));
return;
}
voeg de volgende code direct hieronder toe:
include 'PapApi.class.php';
$saleTracker = new Pap_Api_SaleTracker('URL_TO_PostAffiliatePro/scripts/sale.php');
$prod_count = '1'; // Product Counter
foreach($cartContent[$vendorId][0] as $cartItemId => $product) {
$productid = $product['data']['productid'];
$productPrivateData = $product['product_private_data'];
$price = $product['quantity'] * $product['product_price'];
if (strlen($productPrivateData) == 40) {
$accountId = substr($productPrivateData, 0, 8);
$visitorId = substr($productPrivateData, 8, 32);
} else {
$visitorId = $productPrivateData;
$accountId = 'default1';
}
$saleTracker->setAccountId($accountId);
$saleTracker->setCookieValue($visitorId);
$sale = $saleTracker->createSale();
$sale->setTotalCost($price);
$sale->setOrderID($order['orderid'] . "($prod_count)");
$sale->setProductID($productid);
$saleTracker->register();
$prod_count++;
}
ShopSite biedt een gebruiksvriendelijke winkelwagen voor kleine en middelgrote bedrijven. Integratie met ShopSite kan worden gedaan door het toevoegen van een script voor het volgen van verkoop aan de orderbevestigingspagina. Het biedt ook mogelijkheden voor partnerbeheer en erkent het belang van effectieve partners.
The text discusses the integration of Post Affiliate Pro with various ecommerce platforms, including Volusion, Shopp, ShopSite, and Quick.Cart. It provides step-by-step instructions for setting up tracking script codes, finding article IDs, and adding javascript-tracking codes for sales and clicks. The article emphasizes the trusted reputation of Post Affiliate Pro and offers information on creating a free account. It also mentions related resources such as ViArt and Volusion API. The text ends with contact information and links to support and resources.