Zen Cart custom software development, Zen Cart modules, Zen Cart Expert eCommerce with Zen Cart!

better together

OpenCart Better Together Marketing Text

An OpenCart template change allowing vendors to show off the "buy one, get one" style discounts they have created with OpenCart Better Together.

Donate: This is free software. Show your appreciation by supporting my efforts. Donate

Relevance: OpenCart 2.3.x

Current Version: 1.0
Occasionally, new features are documented prior to being publicly available; please check the version history to ensure the feature you want is available in your version.

Support Thread: Better Together Support Thread

Cost: Free, but donation appreciated

Installed Cost: $90.00 Buy Professional Installation by That Software Guy

Installation Difficulty: Moderate Requires integration with your template.

Installation Instructions: click here

Location: OpenCart Extensions page, under Order Totals

Download: Better Together Marketing Text On OpenCart Extensions Page


FAQ: click here

Configuration: No configuration is necessary; Better Together Marketing Text is driven by your Better Together configuration, whether that was done by editing the setup() function, or using the Better Together Admin panel.


Overview:

OpenCart Better Together is a plugin that allows you to create "Buy one, get one at a discount" type offers in your store.
You may specify
  • Buy item X, get item Y at a discount
  • Buy item X, get an item from category A at a discount
  • Buy an item from category A, get an item from category B at a discount
  • Buy an item from category A, get item X at a discount

Better Together Marketing Text is an addition to Better Together that shows off your discounts on your product page where they are applicable. You must install and configure OpenCart Better Together before adding Better Together Marketing Text.

Example 1 Product Page displaying Better Together Discount

Product page showing Better Together discount

It shows a "Two for One" discount across the Monitors category (28).
This was created with Better Together Admin as shown below: Setup for Better Together discount
or with the setup function
   private function setup() { 
     $this->add_twoforone_cat(28);
   }


Example 2 Product Page displaying Better Together Discount

Here's another example that shows how Better Together Marketing Text shows for both linked products in a Better Together offer.
When a discount which links two different items is created, the offer shows on the product page for both items. Consider the offer "Buy the Nikon, get the Canon at 50% off":
This will show up both on the page for the Nikon camera (product 31)
Display of Better Together discount
and on the page for the Canon camera (product 30)
Display of Better Together discount
To create the discount "Buy the Nikon, get the Canon at 50% off", you'd want to do something like this in Better Together Admin:
Setup for Better Together discount
or with the setup function
   private function setup() { 
     $this->add_prod_to_prod(31, 30, "%", 50);
   }


Example 3 Product Page displaying Better Together Discount

Finally, here's one for a "product to category" discount - buy an iPhone, get a Monitor at 50% off.
Display of Better Together discount

Installation Instructions:

  1. Back up everything! Try this in a test environment prior to installing it on a live shop.
  2. Copy the contents of the folder you have unzipped to the root directory of your shop.
  3. Edit catalog/controller/product/product.php. On line 163, after the product info model information is loaded, insert:
            $data['bt_message'] = $this->load->controller('extension/total/better_together_marketing/get_marketing',  
                                         $product_id);
    
    So what you will have is:
        $product_info = $this->model_catalog_product->getProduct($product_id);
    
        if ($product_info) {
          $url = '';
          $data['bt_message'] = $this->load->controller('extension/total/better_together_marketing/get_marketing',  
                                       $product_id);
    
  4. Edit catalog/view/theme/default/template/product/product.tpl. On line 9, in the creation of the page, add
      <?php require("catalog/view/theme/default/template/extension/total/better_together_marketing.tpl"); ?>
    
    So what you will have is:
      <div class="row"><?php echo $column_left; ?>
        <?php require("catalog/view/theme/default/template/extension/total/better_together_marketing.tpl"); ?>
        <?php if ($column_left && $column_right) { ?>
    
  5. Donate! Show your appreciation by supporting my efforts.

Files

catalog/view/theme/default/template/extension/total/better_together_marketing.tpl
catalog/controller/extension/total/better_together_marketing.php

Major Versions

  • 1.0 07/01/2017 First Release

FAQ

Q: What is OpenCart Better Together?
A: OpenCart Better Together is a discounting module for OpenCart that allows you to offer "Buy one, get one at a discount (possibly free)" type promotions in your store.

Q: What's the difference between Better Together and Discount Chooser?
A: Better Together only permits pairs of items to be discounted together, such as two products, or one product and one item from a specific category. Discount Chooser permits the creation of "Buy 2, get 1", "Buy 3 get 1," or "Buy some number, get a choice of some number." So Better Together can be thought of as a subset of Discount Chooser.