How can I do this?
Here is a Feature Request for implementation of Google analytics in OBAS store:
PBAS-26021 - There is should be a simple way to track and analyze customer visits in online store
Currently the integration should be configured manually using information from PBA-S SDK.
Integration is to be implemented in
confirmation.php.html template file.
This file represents the final step of purchase flow when all information about the order is gathered.
The store templates are located in the
The customized templates should be placed in the upgrade-safe directory:
You may want to use the following variables:
$_SESSION['order'] ['id'] ['doc_num'] ['doc_date'] ['description'] ['detail_list'] [i] ['comment'] ['quantity'] ['unit'] ['rate'] // unit price ['duration'] // period ['discount'] ['amount'] [i+1] ['comment'] ['quantity'] ['unit'] ['rate'] ['duration'] ['discount'] ['amount'] ['doc_total'] $_SESSION['account'] ['address'] ['address1'] ['address2'] ['city'] ['state'] or ['state_alt'] ['country_loc']
NOTE: You can dump the variables by
sw_log (dumper($_SESSION['order']));. All dumped information will be present in
To know the
detail_list length use function http://www.php.net/manual/en/function.count.php.
NOTE: New Store use single page design, so the URL will be
To render different stages of shopping process, like index, configuration, checkout, payment, confirmation, different templates are used.