OpenCart.my Extension Documentation Collection

Welcome

Thank you for purchasing Custom Unit extension!

This document contains information for Custom Unit extension. If you have any questions that are not found in this readme document, please look for contact information in the support section.

Extension info

Custom Unit

Download Page: www.opencart.com/index.php?route=extension/extension/info&extension_id=10463
Version: 1.3.8 / v2 for OpenCart v3.0.x Documentation
Release Date: 21st November 2016
OpenCart version
compatibility:
1.5.0, 1.5.0.1, 1.5.0.2, 1.5.0.3, 1.5.0.4, 1.5.0.5
1.5.1, 1.5.1.1, 1.5.1.2, 1.5.1.3
1.5.2, 1.5.2.1
1.5.3, 1.5.3.1
1.5.4, 1.5.4.1
1.5.5, 1.5.5.1
1.5.6, 1.5.6.1, 1.5.6.2, 1.5.6.3, 1.5.6.4
2.0.0.0, 2.0.1.0, 2.0.1.1, 2.0.2.0, 2.0.3.1
2.1.0.1, 2.1.0.2
2.2.0.0
2.3.0.0, 2.3.0.1, 2.3.0.2
Demo: OpenCart v2.3.0.x
demo.opencart.my/cunit2
Admin Login: demo.opencart.my/cunit2/admin

OpenCart v1.5.6.x
demo.opencart.my/cunit
Admin Login: demo.opencart.my/cunit/admin
Username: demo
Password: demo
Author: Hydrowire - More extensions
Contact: [email protected]

Features

Overview

Custom Unit enables custom quantity unit to be set on each individual product. Useful for products that needs to be collectively purchased in large quantities such as boxes, dozens, packs, cartons, cases, strips, etc. Simple single quantity units are also possible such as litre, centimetre, inches, feet, kilogram, pound, bottles, etc.

Highlights

  1. Custom Units with any quantity multiplier can be set.
  2. Each custom unit can be set on each individual product or all products from a category conveniently.
  3. Works best with product discount pricing.

Installation

Choose either vQmod or OCMOD installation method

vQmod

Prerequisite

  1. OpenCart version must be a compatible version. Please refer to the 'OpenCart version compatibility' list stated above in the Extension Info.
  2. Skip to Install only if vQmod is installed and working on your store.
  3. vQmod version compatibility:
    • Requires vQmod v2.1.5 minimum for OpenCart v1.5.3.1 and below
    • Requires vQmod v2.1.7 for OpenCart 1.5.4 and above
    • Requires vQmod v2.6.1 for OpenCart v2.x and above
  4. Get it from here: https://github.com/vqmod/vqmod/releases
  5. Follow instruction in https://github.com/vqmod/vqmod/wiki/Installing-vQmod-on-OpenCart

Install

  1. Upload all contents from 'upload' folder into your OpenCart store root folder with an FTP software. No files will be replaced.
  2. Login to your admin page, go to Extensions > Modules, and click on [ Install ] for 'Custom Unit' module.

OCMOD

  1. Login to your store admin page, navigate to Extensions > Extension Installer > Upload the extension.ocmod.zip file.
  2. Navigate to Extensions > Modifications > Clear/Refresh.
  3. Navigate to Extensions > Extensions > Modules, and click on [ Install ] for Custom Unit module.

Setup

  1. Click [ Edit ] on 'Custom Unit'.
  2. Please see Usage section for further instructions.

Usage

Insert New Custom Unit

Click on the Insert button to insert new Custom Unit.

Unit Title

Set a title for the unit.

Quantity Unit

Set a text for the quantity unit. This text will be displayed next to the actual quantity unit. E.g. 1dozen. Note that there is no space at the front, so you may insert a space before and after the quantity unit. E.g. 1 dozen .

Unit Suffix

Set a suffix text for single unit. E.g. 12 pcs make a dozen. As like Quantity Unit, you may insert a space before the Unit Suffix.

Unit Value

Set a numeric value of the unit. Value can be a positive number or decimal. Every 1 quantity item that a customer orders equals to this actual Unit Value quantity. E.g. 1 dozen = 12 actual qty unit.

Allow Decimal Quantity

If set to Yes, customer will be able to key in decimal quantity value. E.g. 1.25

Products

Assign products for this Custom Unit. Type in the name of the product in the autocomplete text field and select the product from the drop down list.

Categories

Assign the categories of products for this Custom Unit. Select the desire categories by checking the checkboxes.

Status

Set the status of this Custom Unit.

Save

Click on the Save button to save the new Custom Unit entry.

Delete

Select the Custom Unit that you want to delete by checking the checkboxes on the left and click on the Delete button. Click OK on the confirmation window to confirm the deletion.

Product Discount

You can also take advantage of OpenCart existing Product Discount feature to work with Custom Unit.

Setup the product discount based on actual quantity value.

Result (product page):

Shopping Cart:

Custom Unit Examples

Unit Title Quantity Unit Unit Suffix Unit Value Display
Dozen  dozen   pcs 12 x 1 dozen (12 pcs)
Carton  ctn.  btl. 24 x 1 ctn. (24btl.)
Box  box  s 100 x 1 box (100s)
Centimetre cm 1 x 1cm
Litre L 1 x 1L

Customization

Custom Language

Custom Unit extension readily supports multi languages.

Just enter the relevant custom unit text for each custom language installed on your store, and it will be displayed on the store front end according to the selected language.

To customize other module text such as table column names and button text, please perform the following steps (assuming 'spanish' is custom language folder name):

  1. Make a copy of the following file:
    • /admin/language/english/module/myoc_cunit.php
  2. Paste it into your custom language folder:
    • /admin/language/spanish/module/myoc_cunit.php
  3. Open and edit the newly copied file /admin/language/spanish/module/myoc_cunit.php
  4. Edit the text in the file to your custom language accordingly.
  5. Make a copy of the following file:
    • /catalog/language/english/myoc/cunit.php
  6. Paste it into your custom language folder:
    • /catalog/language/spanish/myoc/cunit.php
  7. Open and edit the newly copied file /catalog/language/spanish/myoc/cunit.php
  8. Edit the text in the file to your custom language accordingly.

Custom Template

Please follow the basic guideline below to customize Custom Unit for non default custom template.

  1. Open and edit /vqmod/xml/myoc_cunit.xml.
  2. Look for the following code:
    <file name="catalog/view/theme/*/template/checkout/cart.tpl">
  3. Make sure the code/text content in between the
    <search>
    tag exist in your corresponding custom template file. If not, you have to modify it to match with your custom template file.
  4. Do the same for every
    <search>
    tags in every
    <file>
    tags with file name that points to a template(.tpl) file:
    • <file name="catalog/view/theme/*/template/checkout/cart.tpl">
    • <file name="catalog/view/theme/*/template/checkout/confirm.tpl">
    • <file name="catalog/view/theme/*/template/product/compare.tpl">
    • <file name="catalog/view/theme/*/template/product/product.tpl">
  5. Please contact support if you need any further assistant in customization.

Troubleshoot / FAQ

Q: Installation failed.

A: Make sure your current store database user account have permission to 'CREATE' and 'DROP' tables in your MySQL database.

Q: Extension is not working after installation.

A: Please make sure the following:

  • vQmod is installed on your store.
  • If you are using a custom template, you might require to customize the extension. Please see Customization > Custom Template.
  • That particular Custom Unit Status is Enabled
  • Categories and Products are set correctly in the Custom Unit.
Please see Usage section for detailed settings instruction.

Uninstall

Please follow the steps below to uninstall Custom Unit from your store.

  1. Login to your store admin and navigate to Extensions > Modules.
  2. Click on [ Uninstall ] for 'Custom Unit' module. WARNING: All Custom Unit data will be erased.
  3. Remove the following files from your store (optional).
    1. /admin/controller/module/myoc_cunit.php
    2. /admin/language/english/module/myoc_cunit.php
    3. /admin/model/myoc/cunit.php
    4. /admin/view/template/myoc/cunit_form.tpl
    5. /admin/view/template/myoc/cunit_list.tpl
    6. /catalog/language/english/myoc/cunit.php
    7. /system/library/myoc_cunit.php
    8. /vqmod/xml/myoc_cunit.xml

Changelog

Version 1.3.8

Release Date: 21st November 2016

  1. Support for OCMOD installation option
  2. Fixed Custom Unit under Related Products is same as current product page custom unit.

Version 1.3.7

Release Date: 9th November 2016

  1. Support for latest OpenCart v2.3.0.x.

Version 1.3.6

Release Date: 21st April 2016

  1. Support for latest OpenCart v2.2.0.0.

Version 1.3.5

Release Date: 21st April 2016

  1. Fixed reorder quantity

Version 1.3.4

Release Date: 16th March 2016

  1. Fixed products taking precedence over categories.

Version 1.3.3

Release Date: 3rd March 2016

  1. Fixed cart quantity reset.
  2. Fixed admin order edit.

Version 1.3.2

Release Date: 11th November 2015

  1. Support latest OpenCart v2.1.0.1

Version 1.3.1

Release Date: 7th September 2015

  1. Fixed admin error when products & categories are empty.

Version 1.3

Release Date: 11th July 2015

  1. Support latest OpenCart v2.0.x

Version 1.2

Release Date: 25th January 2015

  1. Added decimal unit value.
  2. Added "/unit" in discount prices.

Version 1.1

Release Date: 23rd April 2014

  1. Support for OpenCart v1.5.6.x.

Version 1.0

Release Date: 9th February 2013

  1. Custom Unit released.

Support

Questions

If you have any questions regarding this extension, please email to [email protected]

Professional Service

We provide a variety of professional services for your OpenCart store.

  • Extension Customization
  • Extension Integration
  • Custom Template Integration

Please email your request to [email protected] and see how we can help you.

Comments and Feedbacks

You can always post your comments, feedback, or suggestion on the extension page here: www.opencart.com/index.php?route=extension/extension/info&extension_id=10463