OpenCart integration
A free shopping cart system. OpenCart is an open source PHP-based online e-commerce solution.
This is integration method for open source shopping cart OpenCart. The integration is done by integrating files of thank you page.
For OpenCart 2.0 use the other integration method please.
You can track per product orders, lifetime commissions and also coupons.
How to integrate PostAffiliatePro with OpenCart
Edit confirm action
Navigate to your cart directory catalog/controller/checkout and open confirm.php (for older versions also guest_step_3.php) for editing. Find this line:
$this->data['totals'] = $total_data;
There are two places with this line, use the second one. Put this code below that line:
$this->session->data['pap4_totals'] = $total_data;
$this->session->data['pap4_products'] = $this->data['products'];
$this->session->data['pap4_email'] = $this->data['email'];
Save these files and continue with next step.
NOTE: In case you use QuickCheckout you have to modify file quickcheckout.php instead of confirm.php – the integration code needs to be placed into confirm_order() function – there you will find the needed line:
$this->data['totals'] = $total_data;
mentioned at the beginning of this step.
Edit success action
Open file catalog/controller/checkout/success.php and find this line:
if (isset($this->session->data['order_id'])) {
It should be around line 10. Put this code below it:
$this->data['pap4_orderid'] = $this->session->data['order_id'];
$this->data['pap4_totals'] = $this->session->data['pap4_totals'];
$this->data['pap4_products'] = $this->session->data['pap4_products'];
$this->data['pap4_email'] = $this->session->data['pap4_email'];
unset($this->session->data['pap4_totals']);
unset($this->session->data['pap4_products']);
unset($this->session->data['pap4_email']);
Again do not forget to save the changes and continue to the next integration step.
Whole cart as one transaction – Edit success view
If you want to process whole payment as one transaction in PAP follow this step. If you want to create one transaction for every product skip to step 4.
Open file catalog/view/theme/default/template/common/success.tpl
Add these lines before the line which says “echo $footer;“:
<?php
if(isset($pap4_totals) && isset($pap4_orderid) && isset($pap4_email)) {
$subtotal = 0;
foreach ($pap4_totals as $item) {
if ($item['code'] == "sub_total") {$subtotal += $item['value'];}
if ($item['code'] == "coupon") {$subtotal += $item['value'];}
if ($item['code'] == "voucher") {$subtotal += $item['value'];}
}
if ($subtotal < 0) {$subtotal = 0;}
?>
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('Account_ID');var sale = PostAffTracker.createSale();
sale.setTotalCost('<?php echo $subtotal; ?>');
sale.setOrderID('<?php echo $pap4_orderid; ?>');
sale.setData1('<?php echo $pap4_email; ?>');
PostAffTracker.register();
</script>
<?php } ?>
Save the file and your shop is integrated.
Note: The values of ‘coupon’ and ‘voucher’ are negative, that is why we are directly adding it to the subtotal value.
One transaction per product – Edit success view
This step is not necessary if you integrated step 3.
Open file catalog/view/theme/default/template/common/success.tpl.
Add these lines before the line which says “echo $footer;“:
<?php
if(isset($pap4_totals) && isset($pap4_orderid) && isset($pap4_email)) {
?>
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
PostAffTracker.setAccountId('Account_ID');
<?php
$i = 0;
foreach ($pap4_products as $item) {
echo "var sale$i = PostAffTracker.createSale();";
echo "sale".$i.".setTotalCost('".$item['total']."');";
echo "sale".$i.".setProductID('".$item['product_id']."');";
echo "sale".$i.".setOrderID('".$pap4_orderid."(".$i.")');";
echo "sale".$i.".setData1('".$pap4_email."');";
$i++;
}
?>
PostAffTracker.register();
</script>
<?php
}
?>
This will register a commission per each ordered product.
Do not forget to integrate your cart with the click tracking to make the sale tracking work. You can place the click tracking code to the theme footer file:
catalog/view/theme/YOUR_THEME/template/common/footer.tpl.
What is OpenCart?
OpenCart is a powerful open-source e-commerce platform that enables businesses to create and manage their online stores with ease and efficiency. Known for its flexibility and customization options, OpenCart is suitable for businesses of all sizes. It offers support for multiple languages and currencies, a robust admin interface for comprehensive store management, and a vast selection of extensions and themes to enhance the functionality and appearance of your online store.
Originally developed in 1998, OpenCart has significantly evolved over the years, thanks to contributions from a global community of developers. Its open-source nature has allowed for continuous improvements and the expansion of features. This collaborative development has resulted in a customizable and scalable platform that adapts to the evolving needs of online businesses.
OpenCart primarily targets small to medium-sized businesses seeking a flexible and cost-effective solution to establish an online presence. It is particularly beneficial for users with moderate technical skills or those who have access to development resources. OpenCart caters to businesses looking for a platform that offers both affordability and the ability to customize their online stores extensively.
Key Features of OpenCart That Enhance Your Online Store
- Extensive Customizability: Choose from a wide variety of extensions and themes to tailor your store’s functionality and design.
- Multi-Store Capability: Manage multiple stores from a single, unified admin interface.
- Comprehensive Product and Inventory Management: Effortlessly handle your products, categories, and inventory levels.
- Multi-Language and Multi-Currency Support: Reach a global audience by supporting various languages and currencies.
- Built-In SEO Tools: Improve your store’s visibility on search engines with integrated SEO features.
- Diverse Payment Gateway Integrations: Offer your customers flexibility with numerous payment options.
OpenCart Pricing: Understanding the Costs Involved
OpenCart is free to use as an open-source platform, making it an attractive option for businesses mindful of their budget. However, while the core software is free, businesses may incur additional costs for:
- Hosting Services: Selecting a reliable hosting provider to ensure your online store runs smoothly.
- Domain Registration: Securing a domain name for your store.
- Premium Extensions and Themes: Enhancing your store’s functionality and appearance with paid add-ons.
- Professional Services: Investing in customization or technical support if needed.
User Insights: What Do Businesses Say About OpenCart?
Users often praise OpenCart for its flexibility and the extensive variety of extensions available. The multi-store management feature is highly appreciated by businesses operating multiple stores. However, some users note that having technical skills or access to a developer is beneficial, especially when handling complex customizations or challenges.
Video Reviews: Exploring OpenCart in 2023
- OpenCart 2023 Overview: Watch Here – A walkthrough detailing OpenCart’s new features and updates in 2023.
- In-Depth OpenCart Review: Watch Here – An analysis of the pros and cons of using OpenCart in 2023.
- OpenCart 2023 User Experience: Watch Here – Discusses the setup process, ease of use, and overall user experience.
Alternatives to OpenCart: Exploring Other E-Commerce Platforms
- Shopify: Known for its simplicity and robust hosting capabilities, ideal for beginners.
- Magento: Offers comprehensive features suitable for large enterprises needing scalability.
- PrestaShop: Balances user-friendliness with advanced e-commerce functionalities.
- WooCommerce: Integrates seamlessly with WordPress for a highly customizable experience.
- BigCommerce: Provides robust, out-of-the-box features suitable for growing businesses.
- Wix eCommerce: An easy-to-use website builder with integrated e-commerce capabilities.
- Squarespace: Offers creative design templates coupled with e-commerce functionality.
Explore seamless integrations with Post Affiliate Pro to enhance your affiliate marketing strategies. Discover solutions for e-commerce, email marketing, payments, and more, with easy integrations for platforms like 1&1 E-Shop, 2Checkout, Abicart, and many others. Optimize your affiliate network with these powerful tools.
Integrate Post Affiliate Pro with PrestaShop effortlessly using our free module. Enhance your online store with seamless tracking and PayPal integration, ensuring a smooth operation. Discover how to boost your e-commerce success with our easy-to-follow guide. Create your account for free and start optimizing today!
Discover seamless e-commerce with ClickCartPro, integrated with ccBill for efficient sales tracking and commission generation. Set up your store quickly and enhance your affiliate marketing strategy. Sign up for a free account and schedule a call to explore how Post Affiliate Pro can elevate your business.
Effortlessly integrate Shopware with Post Affiliate Pro to enhance your e-commerce platform. Our easy-to-use plugins for Shopware 5 and 6 simplify click and sale tracking. Benefit from per-product commissions, discount coupons, and lifetime commissions. Download, install, and configure quickly to boost your affiliate marketing strategy. Visit us now to learn more!