ChatCart ProChatCart Pro
Advanced

Advanced

Template overrides, CSS customization reference, and translation guidance for developers and advanced users.

Template Overrides

ChatCart Pro follows the standard WooCommerce template override pattern. You can customize any of the plugin's front-end HTML templates by copying them to your active theme (or child theme) without modifying the plugin files directly. This means your customizations survive plugin updates.

Template File Locations

The plugin's templates are located at:

Plugin template paths
wp-content/plugins/chatcart-pro/templates/
├── checkout/
│   ├── customer-fields.php   # Customer information form fields
│   ├── shipping-section.php  # Shipping method selection
│   └── payment-methods.php   # Payment method card grid
└── floating-button.php       # The floating WhatsApp button HTML

How to Override a Template

  1. Identify the template you want to customize from the list above.
  2. In your active theme (or child theme), create the following directory structure:
    Override directory structure
    wp-content/themes/your-theme/
    └── chatcart-pro/
        ├── checkout/
        │   └── customer-fields.php   # overrides the customer fields template
        └── floating-button.php
  3. Copy the original template file from the plugin to the corresponding path in your theme.
  4. Edit your copy. Your changes will be loaded instead of the plugin's default.

After plugin updates

When ChatCart Pro is updated, check if the original template has changed. Compare your override copy with the new plugin template and merge any updates. The plugin version is displayed in the admin header — keep an eye on the changelog for template changes.

Available Template Variables

Inside the customer fields template (checkout/customer-fields.php), the following PHP variables are available:

VariableTypeDescription
$productWC_ProductThe current WooCommerce product object.
$settingsarrayThe plugin settings array from the ccp_settings option.
$fieldsarrayActive checkout fields from ccp_checkout_fields.
$payment_methodsarrayConfigured payment methods from ccp_payment_methods.
$whatsapp_numberstringThe resolved WhatsApp number (after routing logic).

CSS Customization

ChatCart Pro has a minimal PHP hook surface — most visual customization is done via CSS. Every element uses scoped, predictable class names that you can safely target from your theme or child theme.

Button Classes

ClassElement
.ccp-btn--whatsappAll WhatsApp buttons (base styling)
.ccp-btn--productProduct page button
.ccp-btn--cartCart page button
.ccp-btn--mini-cartMini-cart button
.ccp-btn--checkoutCheckout page button
.ccp-btn--loadingButton in loading state
.ccp-btn__iconWhatsApp SVG icon inside button
.ccp-floating-wrapperFloating button outer wrapper
.ccp-floating-buttonFloating button element

Checkout Form Classes

ClassElement
.ccp-checkout-wrapCheckout form outer container
.ccp-form-gridTwo-column field grid
.ccp-field-wrapIndividual field wrapper
.ccp-field-wrap--fullFull-width field
.ccp-field-wrap--halfHalf-width field
.ccp-field-inputText input element
.ccp-payment-cardsPayment method card grid
.ccp-payment-cardIndividual payment method card
.ccp-order-summaryOrder summary sidebar

Tip: use a child theme

Add your CSS overrides to your child theme's style.css or via Appearance → Customize → Additional CSS. This ensures your customizations survive theme updates.

Translations

ChatCart Pro is fully internationalized. All user-facing strings are wrapped in WordPress translation functions with the text domain chatcart-pro.

Using Loco Translate (Recommended)

The easiest way to translate ChatCart Pro is with the free Loco Translate plugin.

  1. Install and activate Loco Translate from the WordPress plugin repository.
  2. In your admin, go to Loco Translate → Plugins → ChatCart Pro.
  3. Click New Language and select your target language.
  4. Loco Translate will detect all translatable strings from the plugin automatically. Translate each string and save.
  5. The generated .mo file is saved to a safe location outside the plugin directory — it won't be overwritten by plugin updates.

Using the .pot File Manually

A .pot template file is included in the plugin at:

POT file location
wp-content/plugins/chatcart-pro/languages/chatcart-pro.pot

You can use this file as the source for any GNU gettext-compatible translation tool, such as Poedit.

  1. Open Poedit and select Create new translation.
  2. Open the chatcart-pro.pot file.
  3. Translate the strings and save as a .po file.
  4. Poedit will also compile a .mo file. Upload both to:
    Translation file destination
    wp-content/languages/plugins/
    ├── chatcart-pro-pt_BR.po
    └── chatcart-pro-pt_BR.mo

Translation File Naming

Name your translation files using the pattern chatcart-pro-{locale}.poand chatcart-pro-{locale}.mo, where {locale} is the WordPress locale code for your language. Common examples:

  • Spanish (Spain): chatcart-pro-es_ES
  • Spanish (Mexico): chatcart-pro-es_MX
  • French: chatcart-pro-fr_FR
  • Brazilian Portuguese: chatcart-pro-pt_BR

If you create a translation and would like to share it with the community, send it to support@veloryntech.com. We may include it in future plugin releases.