Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
Topic Information
Ibn Saeed
Ibn Saeed
Hello
 
I am running Viart Shop Free.
 
I am testing it out right now.
 
I am trying to track sales and its details including order id, total cost, product cost etc.
 
 
This is the php code I need to insert at the the order_final.php, Order Thank you Page.
 
/////////////////////////////
$nsSTcost="";
$nsSToid="";
$nsSToinfo="";
//$nsSTItems=array();
//$nsSTItems[0]['Name']="product";
//$nsSTItems[0]['Cnt']="1";
//$nsSTItems[0]['Value']="10";
include_once "/tracker/track.php";
$nsTrack=new nsTrack("sale", 1, "/tracker");
$nsTrack->Order($nsSTcost, $nsSToid, $nsSToinfo, $nsSTItems);
$nsTrack->DoTrack();
/////////////////////////////////////////
 
 
=============================
 
This is the details :
 
1. If you also want to track the total value of the sale, you would need to use the $nsSTcost variable in the tracking code like this:
 
$nsSTcost='total_value';
 
and replace "total_value" with an actual value of the sale.
 
2. If you want to additionally track information about particular products that were sold, you would need to use the $nsSTItems variable in the tracking code like this:
 
$nsSTItems[0]['Name']='product_name';
$nsSTItems[0]['Value']='value';
$nsSTItems[0]['Cnt']='quantity';
 
and replace "product_name" with an actual name of the product, "value" with an actual value of the product and "quantity" with an actual quantity that was sold. You can use the nsOrderItems variable in the same way several times to specify several different products that were sold.
 
3. You can also track an id of the order from your own shopping system. For this you would need to use the $nsSToid variable in the tracking code like this:
 
$nsSToid='your_order_id';
 
and replace "your_order_id" with an actual id of the order in your shopping system. The maximum length of the id is 64 symbols and it can contain any alpha-numerical characters.
 
4. Along with the sale, you can also log any additional information that would be visible in the Sales log. For this you would need to use the $nsSToinfo variable in the tracking code like this:
 
$nsSToinfo='some_data';
 
and replace "some_data" with any data that you want to store along with the sale.
 
======================================
 
How Can this be done ?
 
I tried entering order_id . For e.g.
$nsSToid='order_id';
 
But this did not work. I tried
 
$nsSToid=$db->f("goods_total");
 
This also did not work.
 
Can anyone help
 
AjnabiZ (Guest)
AjnabiZ (Guest)
I also tried to add Javascript code and the PHP code in the
 
On Success Message Page (Final Checkout Page)