+30.2152151245-8 abuse@cms39.com

The cart accepts products from anywhere: CMS products or an external catalogue. The theme provides each product with productData(). Every time the cart is shown, prices and stock are synchronised and the customer is told if something changed.

// functions.php in the theme
function productData($productKey): array
{
    $p = PageDetail($productKey);              // here: a CMS product; it can also be an external catalogue
    return [
        'product_key' => $productKey,
        'product_sku' => $p['sku'] ?? $productKey,
        'title'       => $p['title'],
        'image'       => $p['thumb'] ?? '',
        'link'        => $p['url'],
        'price'       => (float)$p['price'],        // list price
        'sale_price'  => (float)$p['sale_price'],   // final price
        'vat'         => 24.0,
        'stock'       => (float)$p['stock'],
        'product_status' => 1,                      // 0 = unavailable
        'min_qty' => 1, 'max_qty' => 50, 'step_qty' => 1,
        'weight' => 0.35, 'width' => 12.0, 'height' => 10.0, 'length' => 9.0,   // kg / cm
        'shipping_time' => 1,                       // dispatch days
        'is_service'  => 0,                         // 1 = service, no shipping
    ];
}

Prices, offers, shipping

  • cms39_shop_cart_item_price_get: the price of a product in the cart (e.g. customer pricing)
  • cms39_shop_apply_cart_promos: buy-one-get-one offers
  • cms39_shop_calculate_shipping_cost, cms39_shop_calculate_payment_fee: your own calculation
HookManager::addHook('cms39_shop_apply_cart_promos', function ($promos, $items, $cart) {
    // [['id' => <cart line>, 'new_price' => 0.01], …]
    return $promos;
});

Orders

add_action('cms39_shop_order_status_changed', function ($cartId, $old, $new) {
    // e.g. notify the warehouse when the order becomes "Accepted" (4)
}, 10, 3);

Shipping: courier rates per country / postcode / weight, BoxNow, Skroutz Point, ACS Smartpoint, store pickup. Payments: card, PayPal, bank transfer, cash on delivery. Courier vouchers are created from the order (ACS, BoxNow, ELTA, Skroutz, XPCourier).

for more information contact us by
E-MAIL or by phone at (+30) +30.2152151245-8