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.
  2. Create the directory structure in your active theme:
    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 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

The following variables are available inside checkout/customer-fields.php:

VariableTypeDescription
$productWC_ProductThe current WooCommerce product object.
$settingsarrayThe plugin settings array from 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, and 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

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. Go to Loco Translate → Plugins → ChatCart Pro.
  3. Click New Language and select your target language.
  4. Loco Translate detects translatable strings automatically. Translate each one and save.
  5. The generated .mo file is saved to a safe location that won't be overwritten by updates.

Using the .pot File Manually

A .pot template file is included 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.

Steps

  1. Open Poedit → Create new translation.
  2. Open the chatcart-pro.pot file.
  3. Translate the strings, then save as a .po file.
  4. Poedit compiles the .mo file automatically. Upload both to:
    Translation file destination
    wp-content/languages/plugins/
    ├── chatcart-pro-pt_BR.po
    └── chatcart-pro-pt_BR.mo

Translation File Naming

Pattern: chatcart-pro-{locale}.po and chatcart-pro-{locale}.mo

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

Share your translation

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.