Compatibility and languages
Which themes, checkouts and cart modifications the extension works with, how it behaves in multi-store shops and which languages it includes.
How the extension connects to your shop
The extension works inside OpenCart's own cart, so prices, discounts, taxes, coupons and stock keep being calculated by OpenCart. The way it connects depends on the OpenCart family:
| OpenCart | Connection |
|---|---|
| 1.5 | A VQMod file, vqmod/xml/gift_products_pro.xml. |
| 2.0 to 2.3 | An OCMOD modification, listed in Extensions > Modifications. |
| 3.x | An OCMOD modification, listed in Extensions > Modifications. |
| 4.0 and 4.1 | Two OpenCart events, registered when you install the module. |
No core file is replaced in any family.
The cart adapter on OpenCart 1.5–2.3 and 4.x
On these versions the extension reads the cart class your shop is using, including changes made by other compatible modifications, adds the gift rules and stores the result in the folder gift_products_pro inside the OpenCart cache directory. The cache directory must be writable. The copy is rebuilt automatically when the cart code changes.
This works with the standard OpenCart cart class. If another extension replaces the cart with a class of its own, Gift Products PRO stops with the message Gift Products PRO requires a cart adapter for this custom cart class. and needs an adapter written for that shop. See Troubleshooting.
Themes
Default theme
The default OpenCart theme is supported in every family. The gift window is added before the closing </body> tag of the footer and uses jQuery, which the default theme loads.
Journal 3
The OpenCart 3 installer includes hooks for Journal 3: the gift window in the Journal footer, the green GIFT label on gift lines in the Journal cart and checkout, and a refresh of the Journal checkout after a gift is added. Journal is not required and is not included with the extension.
Other themes
- On OpenCart 1.5–2.3 the gift window is added to the
common/footer.tpltemplate of any theme, as long as that template contains the</body>tag. - On OpenCart 3 the window is added to the footer template of the default theme and of Journal 3. A theme with its own
common/footer.twigneeds this line before</body>in that file:
{{ gift_products_pro_popup }}- On OpenCart 4 the window is added to the footer output of any theme that ends it with
</body>.
The gift window templates are in the default theme folder. On OpenCart 1.5–3 the default templates are used when your theme has no copy of its own.
Checkout extensions
The gift is a normal cart line, so a checkout that reads the cart from OpenCart receives it with a price of zero. The gift window also opens on checkout pages and reloads the page after a gift is added.
Custom themes, modified cart classes and third-party checkout extensions can need integration work. If you use one, open a support ticket with the name and version of the theme or checkout before you rely on it in production.
Multi-store
Campaigns are saved once and apply to every store of the same OpenCart installation. There is no store condition in a campaign.
For shoppers who are not logged in, each store uses its own default customer group. If your stores have different default groups, tick each of those groups in the campaigns that guests must see.
Languages
The administration and the gift window are included in eight languages:
| Language | OpenCart language folder |
|---|---|
| English | en-gb (and english on OpenCart 1.5–2.1) |
| Spanish | es-es (and spanish) |
| German | de-de (and german) |
| Russian | ru-ru (and russian) |
| Ukrainian | uk-ua (and ukrainian) |
| Portuguese (Portugal) | pt-pt (and portuguese) |
| French | fr-fr (and french) |
| Italian | it-it (and italian) |
The shopper sees the gift window in the language chosen in the shop, and the administrator sees the module in the language of the administration. Gift product names, option names and images come from your catalogue, in the shopper's language.
The installation guide inside the download is also provided in these eight languages.
Changing the shop texts
The texts of the gift window are in the catalogue language file of the module, for example catalog/language/en-gb/extension/module/gift_products_pro.php on OpenCart 2.3 and 3. You can edit these lines:
| Key | English text |
|---|---|
text_gift_products_pro | GIFT |
heading_gift | Choose your free gift |
text_choose_gift | Choose one available gift and complete any required options. |
text_select | Please select |
button_claim | Add my gift to cart |
button_close | Continue without a gift |
text_gift_added | Your gift has been added to your cart. |
error_required | %s is required. |
error_gift_unavailable | This gift is no longer available. Refresh your cart and try again. |
Keep a copy of your changes: updating the extension replaces the language files.
Still need help?
Open a support ticket from your account and our team will look at your store with you.