33

Product support

Visit this product's website for support.

Categories

.

Please, use the following credentials user:manager,password:manager for logging to the Dashboard.

New FREE Shopaholic Bootstrap Theme Available!

Free E-Commerce Bootstrap for Shopaholic theme is now available on October's marketplace. Check out the theme's live demo version. It demonstrates what you can build with Shopaholic and will soon have support for all our plugins and extensions. We will also constantly update it to cover all Shopaholic functionality.

Open to your Ideas!

Let us know if you have any questions, ideas or suggestions! Just drop a line at shopaholic@lovata.com

Live Demo

You can visit our Live Demo site. Sign in to backend using: login - manager, password - manager. You can deploy the demo site locally. To do so, you need to clone the repository, follow the steps from the "Installation guide", install the plugins. As a result, you will receive a copy of the demo site with a full database. Having a ready-made demo site example, you can easily learn how to operate the plugins.

Large Catalog Performance Live Demo

If you would like to know how our plugins perform with large catalogs of products, you can visit our Large Catalog Live Demo that has 21 000 products, 68 000 offers and 210 000 variations of property values.

Below are the performance characteristics for server setup: Dual Core CPU with 4GB of RAM.

For a catalog containing 210 products

Catalog page load time: 100-150 ms

Product list filtering time: 80-100 ms

For a catalog containing 21 000 products

Catalog page load time: 900-1100 ms

Product list filtering time: 500-600 ms

Support

Please join us on #shopaholic channel in October CMS slack chat in order to have quick support on all our products. You will also get all newest updates and insights about our existing and upcoming products!

If you have any specific requests, suggestions or ideas please do not hesitate to send us a message, it will help us make our products even better.

If you don't have access to octobercms.slack.com, please register here

Required Plugins

Recommended Plugins

General information

The Orders plugin adds functionality to Shopaholic, allowing you to manage incoming orders.

With this plugin you are able to:

  • Oversee the orders in the back-end, overlook and change their state or delete them upon completion
  • Create, and modify delivery methods. Delivery methods can be displayed as text info or interactive interface components (buttons, radio buttons)
  • Display various payment methods and allow users to choose their desired method (without integration with online payment systems)
  • Send e-mails after creating an order. E-mails can be sent to users and managers using different mail templates. You can add data to mail templates using events.

Users are able to:

  • Choose products and put them in their cart
  • Change the product quantity and delete them from the cart
  • Proceed to checkout and choose delivery methods and payment types through the interface that you provide

Promo Logic & Mechanisms

These Promo Logic and Mechanisms can be used with our Coupons for Shopaholic and Campaigns for Shopahoic paid extensions to easily setup promo mechanisms on your online shop.

Promo Logic

We have included 22 Promo mechanisms for you to use manually or with the help of our extensions:

Discount without conditions

  • Discount on the position price without conditions - Use this if you need a discount on the price of the position to be applied without checking any conditions. Works great for applying coupons.
  • Discount on the position price with minimal price without conditions - Use this if you need a discount on the price of the position with minimal price to be applied without checking any conditions. Works great for applying coupons.
  • Discount on the total price of positions without conditions - Use this if you need a discount on the total price of positions list to be applied without checking any conditions. Works great for applying coupons.
  • Discount on the shipping price without conditions - Use this if you need a discount on the shipping price to be applied without checking any conditions. Works great for applying coupons.
  • Discount on the total price of order without conditions - Use this if you need a discount on the total price of order to be applied without checking any conditions. Works great for applying coupons.

Discount if the total price of the position is greater than "XX"

  • Discount on the shipping price if the total price of the position is greater than "XX" - Use this if you need a discount on the shipping price to be applied if the total price of the position is greater than the set value. Example: The shipping price discount is 5%, if the total price of the position is greater than 50$.
  • Discount on the total price of an order if the total price of the position is greater than "XX" - Use this if you need a discount on the total price of an order to be applied if the total price of the position is greater than the set value. Example: The total price discount is 5%, if the total price of the position is greater than 50$.

Discount if the total quantity of one offer in the order is greater than "XX"

  • Discount on the position price if the total quantity of one offer in the order is greater than "XX" - Use this if you need a discount on the price of the position to be applied if the total quantity of one offer in the order is greater than the set value. Example: The position price discount is 5%, if the total quantity of the offer "T-shirt size 52" is greater than 3.
  • Discount on the position with minimal price if the total quantity of one offer in the order is greater than "XX" - Use this if you need a discount on the price of the position with minimal price to be applied if the total quantity of one offer in the order is greater than the set value. Example: The discount on the position with minimal price is 5%, if the total quantity of the offer "T-shirt size 52" is greater than 3.
  • Discount on the total price of positions if the total quantity of one offer in the order is greater than "XX" - Use this if you need a discount on the total price of positions to be applied if the total quantity of one offer in the order is greater than the set value. Example: The discount on the total price of positions is 5%, if the total quantity of the offer "T-shirt size 52" is greater than 3.
  • Discount on the shipping price if the total quantity of one offer in the order is greater than "XX" - Use this if you need a discount on the shipping price to be applied if the total quantity of one offer in the order is greater than the set value. Example: Shipping price discount is 5%, if the total quantity of the offer "T-shirt size 52" is greater than 3.
  • Discount on the total price of an order if the total quantity of one offer in the order is greater than "XX" - Use this if you need a discount on the total price of an order to be applied if the total quantity of one offer in the order is greater than the set value. Example: Total price discount is 5%, if the total quantity of the offer "T-shirt size 52" is >= 3.

Discount if the total quantity of offers in the order is greater than "XX"

  • Discount on the price of the position if the total quantity of offers in the order is greater than "XX" - Use this if you need a discount on the price of the position to be applied if the total quantity of offers in the order is greater than the set value. Example: Position price discount is 5%, if the total quantity of offers "T-shirt size 52" (quantity = 2) + "T-shirt size 56" (quantity = 2) = 4 is greater than 3.
  • Discount on the position with minimal price if the total quantity of offers in the order is greater than "XX" - Use this if you need a discount on the the position with minimal price to be applied if the total quantity of offers in the order is greater than the set value. Example: The discount for position with minimal price is 5%, if the total quantity of offers "T-shirt size 52" (quantity = 2) + "T-shirt size 56" (quantity = 2) = 4 is greater than 3.
  • Discount on the total price of positions if the total quantity of offers in the order is greater than "XX" - Use this if you need a discount on the total price of positions to be applied if the total quantity of offers in the order is greater than the set value. Example: Total price of positions discount is 5%, if the total quantity of offers "T-shirt size 52" (quantity = 2) + "T-shirt size 56" (quantity = 2) = 4 is greater than 3.
  • Discount on the shipping price if the total quantity of offers in the order is greater than "XX" - Use this if you need a discount on the shipping price to be applied if the total quantity of offers in the order is greater than the set value. Example: Shipping price discount is 5%, if the total quantity of offers "T-shirt size 52" (quantity = 2) + "T-shirt size 56" (quantity = 2) = 4 is greater than 3.
  • Discount on the total price of an order if the total quantity of offers in the order is greater than "XX" - Use this if you need a discount on the total price of an order to be applied if the total quantity of offers in the order is greater than the set value. Example: Total price discount is 5%, if the total quantity of offers "T-shirt size 52" (quantity = 2) + "T-shirt size 56" (quantity = 2) = 4 is greater than 3.

Discount if the position count in the order is greater than "XX"

  • Discount on the position price if the position count in the order is greater than "XX" - Use this if you need a discount on the price of the position to be applied if the position count in the order is greater than the set value. Example: Position discount is 5%, if the position count is greater than 3.
  • Discount on the position with minimal price if the position count in the order is greater than "XX" - Use this if you need a discount on the position with min price to be applied if the position count in the order is greater than the set value. Example: Minimal price position discount is 5%, if the position count is greater than 3.
  • Discount on the total price of positions if the position count in the order is greater than "XX" - Use this if you need a discount on the total price of positions to be applied if the position count in the order is greater than the set value. Example: Total price discount is 5%, if the position count is greater than 3.
  • Discount on the shipping price if the position count in the order is greater than "XX" - Use this if you need a discount on the shipping price to be applied if the position count in the order is greater than the set value. Example: Shipping price discount is 5%, if the position count is greater than 3.
  • Discount on the total price of an order if the position count in the order is greater than "XX" - Use this if you need a discount on the total price of an order to be applied if the position count in the order is greater than the set value. Example: Total price discount is 5%, if the position count is greater than 3.

Additional Promo Mechanism Parameters

  • Logic Priority of promotional activities - promo activities with higher priority are applied first;
  • Finalize promo activity - block other promo activities with less priority.

Authorization\Authentication features with Rainlab.User or Buddies plugin

Our Buddies plugin adds authorization functionality to Orders, allowing users to log in while placing orders. Orders Plugin now has integration with Rainlab.User, so you can also use it on projects that still run with this plugin. However, we highly recommend to make the transition and use our Buddies plugin!

Get involved and contribute to the project

If you’d like to help us improve the project, you can do so in the following ways:

You can also visit LOVATA’s GitHub page.

License

© 2018, LOVATA Software Development Company under GNU GPL v3.

Developed by Andrey Kharanenka.

The following plugins are required
This plugin is also included into the following bundles

FREE Shopaholic Bootstrap Starter Bundle

FREE Shopaholic Bootstrap Starter Bundle FREE Shopaholic Bootstrap Starter Bundle FREE Shopaholic Bootstrap Starter Bundle FREE Shopaholic Bootstrap Starter Bundle
4 products
Free

A collection of all free Shopaholic plugins

213 projects

FREE Shopaholic Bootstrap Starter Bundle

4 products
Free

A collection of all free Shopaholic plugins

  • Toolbox
  • Bootstrap theme for Shopaholic
  • Orders for Shopaholic
  • Shopaholic

Sneakers Shop Pro for Shopaholic

Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic Sneakers Shop Pro for Shopaholic
18 products
$249.99
Save $54.90!

The ready-made online athletic shoe store

16 projects

Sneakers Shop Pro for Shopaholic

18 products
$249.99
Save $54.90!

The ready-made online athletic shoe store

  • Sneakers E-Commerce Theme for Shopaholic
  • Good News
  • Filter for Shopaholic
  • Mighty SEO
  • + 14 more

Sneakers Shop for Shopaholic

Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic Sneakers Shop for Shopaholic
12 products
$149.99
Save $59.95!

The ready-made online athletic shoe store

12 projects

Sneakers Shop for Shopaholic

12 products
$149.99
Save $59.95!

The ready-made online athletic shoe store

  • Sneakers E-Commerce Theme for Shopaholic
  • Good News
  • Filter for Shopaholic
  • Mighty SEO
  • + 8 more

Biolia Shop Pro for Shopaholic

Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic Biolia Shop Pro for Shopaholic
12 products
$199.99
Save $44.93!

The ready-made online organic food store

4 projects

Biolia Shop Pro for Shopaholic

12 products
$199.99
Save $44.93!

The ready-made online organic food store

  • Biolia E-Commerce Theme for Shopaholic
  • Good News
  • Filter for Shopaholic
  • Mighty SEO
  • + 8 more

Biolia Shop for Shopaholic

Biolia Shop for Shopaholic Biolia Shop for Shopaholic Biolia Shop for Shopaholic Biolia Shop for Shopaholic Biolia Shop for Shopaholic Biolia Shop for Shopaholic Biolia Shop for Shopaholic Biolia Shop for Shopaholic Biolia Shop for Shopaholic
9 products
$139.99
Save $49.96!

The ready-made online organic food store

0 projects

Biolia Shop for Shopaholic

9 products
$139.99
Save $49.96!

The ready-made online organic food store

  • Biolia E-Commerce Theme for Shopaholic
  • Good News
  • Filter for Shopaholic
  • Mighty SEO
  • + 5 more
The following plugins extend or depend on the plugin
Omnipay for Shopaholic
Free

Omnipay for Shopaholic

Adds intergation with ignited/laravel-omnipay package

2,858 installations
# 82 in Free of all time.
Free

Omnipay for Shopaholic

Adds intergation with ignited/laravel-omnipay package

PayPal for Shopaholic
$14.99

PayPal for Shopaholic

Allows customers to buy products using PayPal payment gateway

72 projects
# 44 in Paid of all time.
$14.99

PayPal for Shopaholic

Allows customers to buy products using PayPal payment gateway

Coupons for Shopaholic
$29.99

Coupons for Shopaholic

Allows sellers to sell products with discounted price using coupons

150 projects
# 24 in Paid of all time.
$29.99

Coupons for Shopaholic

Allows sellers to sell products with discounted price using coupons

Campaigns for Shopaholic
$24.99

Campaigns for Shopaholic

Allows sellers to launch promo campaigns

77 projects
# 41 in Paid of all time.
$24.99

Campaigns for Shopaholic

Allows sellers to launch promo campaigns

Stripe for Shopaholic
$14.99

Stripe for Shopaholic

Adds possibility to pay for orders using Stripe

50 projects
# 46 in Paid of all time.
$14.99

Stripe for Shopaholic

Adds possibility to pay for orders using Stripe

YooKassa for Shopaholic
$14.99

YooKassa for Shopaholic

Payment gateway integration for Shopaholic. 54-ФЗ Supported!

40 projects
# 13 in Paid of all time.
$14.99

YooKassa for Shopaholic

Payment gateway integration for Shopaholic. 54-ФЗ Supported!

ROBOKASSA for Shopaholic
$14.99

ROBOKASSA for Shopaholic

Payment gateway integration for Shopaholic.

16 projects
# 104 in Paid of all time.
$14.99

ROBOKASSA for Shopaholic

Payment gateway integration for Shopaholic.

Sberbank for Shopaholic
$14.99

Sberbank for Shopaholic

Payment gateway integration for Shopaholic. 54-ФЗ Supported!

25 projects
# 72 in Paid of all time.
$14.99

Sberbank for Shopaholic

Payment gateway integration for Shopaholic. 54-ФЗ Supported!

LiqPay for Shopaholic
$14.99

LiqPay for Shopaholic

Payment gateway integration for Shopaholic.

12 projects
# 105 in Paid of all time.
$14.99

LiqPay for Shopaholic

Payment gateway integration for Shopaholic.

Uniteller for Shopaholic
$14.99

Uniteller for Shopaholic

Payment gateway integration for Shopaholic.

2 projects
# 197 in Paid of all time.
$14.99

Uniteller for Shopaholic

Payment gateway integration for Shopaholic.

PayKeeper for Shopaholic
$15

PayKeeper for Shopaholic

PayKeeper payment gateway integration for Shopaholic

6 projects
# 149 in Paid of all time.
$15

PayKeeper for Shopaholic

PayKeeper payment gateway integration for Shopaholic

UTM Analytics for Shopaholic
Free

UTM Analytics for Shopaholic

Plugin provides UTM-analytics for Shopaholic orders

135 installations
# 693 in Free of all time.
Free

UTM Analytics for Shopaholic

Plugin provides UTM-analytics for Shopaholic orders

CloudPayments for Shopaholic
$14.99

CloudPayments for Shopaholic

Payment gateway integration for Shopaholic.

2 projects
# 198 in Paid of all time.
$14.99

CloudPayments for Shopaholic

Payment gateway integration for Shopaholic.

Subscriptions for Shopaholic
$14.99

Subscriptions for Shopaholic

Allows sellers to sell products on a subscription

31 projects
# 67 in Paid of all time.
$14.99

Subscriptions for Shopaholic

Allows sellers to sell products on a subscription

Custom order numbers for Shopaholic
Free

Custom order numbers for Shopaholic

Create your own custom order numbers for Shopaholic

71 installations
# 683 in Free of all time.
Free

Custom order numbers for Shopaholic

Create your own custom order numbers for Shopaholic

Alfa-Bank for Shopaholic
$14.99

Alfa-Bank for Shopaholic

Payment gateway integration for Shopaholic. 54-ФЗ Supported!

13 projects
# 108 in Paid of all time.
$14.99

Alfa-Bank for Shopaholic

Payment gateway integration for Shopaholic. 54-ФЗ Supported!

WayForPay for Shopaholic
$14.99

WayForPay for Shopaholic

Payment gateway integration for Shopaholic.

6 projects
# 148 in Paid of all time.
$14.99

WayForPay for Shopaholic

Payment gateway integration for Shopaholic.

Tinkoff for Shopaholic
$14.99

Tinkoff for Shopaholic

Payment gateway integration for Shopaholic. 54-ФЗ Supported!

9 projects
# 123 in Paid of all time.
$14.99

Tinkoff for Shopaholic

Payment gateway integration for Shopaholic. 54-ФЗ Supported!

Shopaholic Fakturoid
Free

Shopaholic Fakturoid

Shopaholic Fakturoid connector

7 installations
# 784 in Free of all time.
Free

Shopaholic Fakturoid

Shopaholic Fakturoid connector

Shopaholic integration for Notify
Free

Shopaholic integration for Notify

Shopaholic integration for the RainLab.Notify plugin for October CMS

74 installations
# 528 in Free of all time.
Free

Shopaholic integration for Notify

Shopaholic integration for the RainLab.Notify plugin for October CMS

Invoice for Shopaholic
Free

Invoice for Shopaholic

Adds a send invoice action to the notify plugin

54 installations
# 480 in Free of all time.
Free

Invoice for Shopaholic

Adds a send invoice action to the notify plugin

Paysera for Shopaholic
$14.99

Paysera for Shopaholic

Paysera payment provider for Orders for Shopaholic plugin

0 projects
# 165 in Paid of all time.
$14.99

Paysera for Shopaholic

Paysera payment provider for Orders for Shopaholic plugin

Feeds for Shopaholic
Free

Feeds for Shopaholic

Feeds for Shopaholic plugin for OctoberCMS

22 installations
# 662 in Free of all time.
Free

Feeds for Shopaholic

Feeds for Shopaholic plugin for OctoberCMS

Bonuses for Shopaholic
Free

Bonuses for Shopaholic

Bonuses system for Shopaholic

28 installations
# 425 in Free of all time.
Free

Bonuses for Shopaholic

Bonuses system for Shopaholic

Roistat for Shopaholic
$15

Roistat for Shopaholic

Transfer of the Shopaholic order to Roistat

0 projects
# 220 in Paid of all time.
$15

Roistat for Shopaholic

Transfer of the Shopaholic order to Roistat

Shopaholic Heuréka
Free

Shopaholic Heuréka

Shopaholic Heuréka.cz/sk connector plugin for OctoberCMS

1 installation
# 787 in Free of all time.
Free

Shopaholic Heuréka

Shopaholic Heuréka.cz/sk connector plugin for OctoberCMS

Melipay
$14

Melipay

Payment gateways for Shopaholic OctoberCMS

1 project
# 227 in Paid of all time.
$14

Melipay

Payment gateways for Shopaholic OctoberCMS

The following themes use this plugin
Order list

The full plugin documentation is available here.

Cart component

The component allows to work with user cart.

Method list

onAdd()

Method adds offers to cart. Example:

//Prepare object with offers
var data = {
    'cart': [
        {'offer_id': 2, 'quantity': 4, 'property': {'double_cheese': true}},
        {'offer_id': 5, 'quantity': 1, 'property': {'double_cheese': false}},
        {'offer_id': 10, 'quantity': 1, 'property': {'double_cheese': true}}
    ]
};

//Send ajax request and update cart items
$.request('Cart::onAdd', {
    'data': data,
    'update': {'cart-items': '.cart-item-wrapper'}
});
onUpdate()

Method updates quantity of offers in cart. Example:

//Prepare object with offers
var data = {
    'cart': [
        {'offer_id': 2, 'quantity': 4},
        {'offer_id': 5, 'quantity': 1},
        {'offer_id': 10, 'quantity': 1}
    ]
};

//Send ajax request and update cart items
$.request('Cart::onUpdate', {
    'data': data,
    'update': {'cart-items': '.cart-item-wrapper'}
});
onRemove()

Method removes offers from cart. Example:

//Prepare array with offers ID
var data = {
    'cart': [2,10]
};

//Send ajax request and update cart items
$.request('Cart::onRemove', {
    'data': data,
    'update': {'cart-items': '.cart-item-wrapper'}
});
onClear()

Method removes all offers from cart. Example:

//Send ajax request and update cart items
$.request('Cart::onClear', {
    'data': data,
    'update': {'cart-items': '.cart-item-wrapper'}
});
get($obShippingType = null)

Method returns CartElementCollection class object. You can pass active sipping type object to the method to get the total cost of the order with shipping price. Example:

{% set obCartElementList = Cart.get() %}
{% if obCartElementList.isNotEmpty() %}
    {% for obCartElement in obCartElementList %}
        {% set obOffer = obCartElement.offer %}
        <div>Name: {{ obOffer.product.name }}</div>
        <div>Quantity: <input type="number" value="{{ obCartElement.quantity }}"></div>
        <div>Price: {{ obOffer.price }} {{ obOffer.currency }}</div>
        <div>Total price: {{ obCartElement.price }} {{ obCartElement.currency }}</div>
    {% endfor %}

    <div>Total price: {{ obCartElementList.getTotalPrice() }} {{ obCartElementList.getCurrency() }}</div>
{% else %}
 <div>Cart is empty</div>
{% endif %}
onSetShippingType()

Method allows you to send ajax request with ID of active shipping type and get updated cart data

//Send ajax request and update cart data
$.request('Cart::onSetShippingType', {
    'data': {'shipping_type_id': iActiveShippingTypeID},
    success: function(response) {
        updateCart(response);
    }
});
getTotalPrice()

Method returns formatted total price string ("1 450,95")

    $obList = CartPositionCollection::make([1,2,10,15]);
    echo $obList->getTotalPrice();
getTotalPriceValue()

Method returns float total price value (1450.95)

    $obList = CartPositionCollection::make([1,2,10,15]);
    echo $obList->getTotalPriceValue();
getOldTotalPrice()

Method returns formatted total price string without discounts ("1 650,95")

    $obList = CartPositionCollection::make([1,2,10,15]);
    echo $obList->getOldTotalPrice();
getOldTotalPriceValue()

Method returns float total price value without discounts (1650.95)

    $obList = CartPositionCollection::make([1,2,10,15]);
    echo $obList->getOldTotalPriceValue();
getDiscountTotalPrice()

Method returns formatted discount price string ("200,00")

    $obList = CartPositionCollection::make([1,2,10,15]);
    echo $obList->getDiscountTotalPrice();
getDiscountTotalPriceValue()

Method returns float discount price value (200)

    $obList = CartPositionCollection::make([1,2,10,15]);
    echo $obList->getDiscountTotalPriceValue();
getTotalPriceData()

Method returns PriceContainer class object.

    $obList = CartPositionCollection::make([1,2,10,15]);
    echo $obList->getTotalPriceData();

MakeOrder component

The component allows to create orders.

Component properties:

  • Mode (Submit form/Ajax form)
  • Send flash message (only for Ajax mode)
  • Enable redirect
  • Choose page for redirect (the URL of the page will be passed to the order ID and order number)

Usage: The component is used to process the order form. To send an ajax request, you must use the MakeOrder::onCreate method. You need to send the 'order' object with the order data and the 'user' object with the user data. Acceptable order fields: payment_method_id, shipping_type_id, shipping_price, property (array). User data will be stored in the 'property' field of the order. If the setting is enabled, a new user will be created or the order will be attached to the authorized user.

Example 1 (Submit form).

[MakeOrder]
mode = "submit"
redirect_on = 1
redirect_page = "order_success"

[PaymentMethodList]

[ShippingTypeList]
==

{% set arError = MakeOrder.getErrorMessage %}
{% set arForm = MakeOrder.getOldFormData %}

<form href="{{ 'order'|page }}">
    <label for="field-email">Email</label>
    <input type="email" id="field-email" placeholder="Email" name="user[email]" value="{{ arForm.user.email }}">
    {% if arError.message is not empty and arError.field == 'email' %}
        <p>{{ arError.message }}</p>
    {% endif %}

    <label for="field-company-name">Company name</label>
    <input type="text" id="field-company-name" placeholder="My company" name="user[property][company_name]" value="{{ arForm.user.property.company_name }}">

    {% set obPaymentMethodList = PaymentMethodList.make().sort().active() %}
    {% if obPaymentMethodList.isNotEmpty() %}
        <div class="payment-method-list-wrapper">
            {% for obPaymentMethod in obPaymentMethodList %}
                <input type="radio" name="order[payment_method_id]" id="payment-{{ obPaymentMethod.id }}" value="{{ obPaymentMethod.id }}">
                <label for="payment-{{ obPaymentMethod.id }}">{{ obPaymentMethod.name }}</label>
            {% endfor %}
        </div>
    {% endif %}

    {% set obShippingTypeList = ShippingTypeList.make().sort().active() %}
    {% if obShippingTypeList.isNotEmpty() %}
        <div class="payment-method-list-wrapper">
            {% for obShippingType in obShippingTypeList %}
                <input type="radio" name="order[shipping_type_id]" id="payment-{{ obShippingType.id }}" value="{{ obShippingType.id }}">
                <label for="payment-{{ obShippingType.id }}">{{ obShippingType.name }}</label>
            {% endfor %}
        </div>
    {% endif %}

    <input type="hidden" name="order[shipping_price]" value="5.50">
    <button type="submit">Submit</button>
</form>
{% if arError.message is not empty %}
    <p>{{ arError.message }}</p>
{% endif %}

Example 1 (Ajax request).

var data = {
    'order': {
        'payment_method_id': 1,
        'shipping_type_id': 2,
        'shipping_price': 10.5,
        'property': {
            'address': '...',
            'city': 'Minsk'
        }
    },
    'user': {
        'email': 'test@test.com',
        'name': 'Andrey'
    }
};

$.request('MakeOrder::onCreate', {
    'data': data
});

The MakeOrder.getOldFormData method returns the filled form fields, if the form was sent and an error occurred. The MakeOrder.getErrorMessage method returns an error message if the form was sent and an error occurred.

[
    'message' => 'Error message',
    'field'   => 'email',           //Field name, if there was a validation error
]

Event "shopaholic.order.created"

You can add your logic after creating an order.

Event::listen('shopaholic.order.created', function($obOrder) {
    ...
});

Event "shopaholic.order.created.user.template.data"

You can add additional fields in the email template (for users). By default, the 'lovata.ordersshopaholic::mail.create_order_user' template is used. To integrate with the Translate plugin, you need to create templates for languages with suffix = language code. For example:

  • 'lovata.ordersshopaholic::mail.create_order_user' - for default language
  • 'lovata.ordersshopaholic::mail.create_order_user_ru' - for language with code 'ru'
Event::listen('shopaholic.order.created.user.template.data', function($obOrder) {
    ...

    //Return array with addition fields
    return $arResult;
});

Event "shopaholic.order.created.manager.template.data"

You can add additional fields in the email template (for managers). By default, the 'lovata.ordersshopaholic::mail.create_order_manager' template is used. To integrate with the Translate plugin, you need to create templates for languages with suffix = language code. For example:

  • 'lovata.ordersshopaholic::mail.create_order_manager' - for default language
  • 'lovata.ordersshopaholic::mail.create_order_manager_ru' - for language with code 'ru'
Event::listen('shopaholic.order.created.manager.template.data', function($obOrder) {
    ...

    //Return array with addition fields
    return $arResult;
});

PaymentMethodList component

The component allows to work with PaymentMethodCollection class objects.

Method list

make($arElementIDList = null)

Example: render list of payment methods

Get collection of payment methods, apply sorting + filter by flag "active"

{% set obPaymentMethodList = PaymentMethodList.make().sort().active() %}
{% if obPaymentMethodList.isNotEmpty() %}
    <div class="payment-method-list-wrapper">
        {% for obPaymentMethod in obPaymentMethodList %}
            <div data-id="{{ obPaymentMethod.id }}">
                <div>{{ obPaymentMethod.name }}</div>
                <div>{{ obPaymentMethod.preview_text }}</div>
            </div>
        {% endfor %}
    </div>
{% endif %}

ShippingTypeList component

The component allows to work with ShippingTypeCollection class objects.

Method list

make($arElementIDList = null)

Example: render list of shipping types

Get collection of shipping types, apply sorting + filter by flag "active"

{% set obShippingTypeList = ShippingTypeList.make().sort().active() %}
{% if obShippingTypeList.isNotEmpty() %}
    <div class="payment-method-list-wrapper">
        {% for obShippingType in obShippingTypeList %}
            <div data-id="{{ obShippingType.id }}">
                <div>{{ obShippingType.name }}</div>
                <div>{{ obShippingType.preview_text }}</div>
            </div>
        {% endfor %}
    </div>
{% endif %}

UserAddress component

The component allows to create/update/remove user addresses.

Method list

onAdd()

Method creates new user address. Example:

$('form').request('UserAddress::onAdd');
onUpdate()

Method updates user address. Example:

//Prepare object with address data
var data = {
    'id': 10,
    'address1': 'test'
};

//Send ajax request
$.request('UserAddress::onUpdate', {
    'data': data
});
onUpdateList()

Method syncs user address list. Example:

//Prepare object with address data
var data = [
      {'id': 10, 'address1': 'test1'},
      {'id': 12, 'address1': 'test2'}
];

//Send ajax request
$.request('UserAddress::onUpdateList', {
    'data': data
});
onRemove()

Method removes user address. Example:

var data = {
    'id': 10
};

$.request('UserAddress::onRemove', {
    'data': data
});
var data = {
    'id': [2, 10]
};

$.request('UserAddress::onRemove', {
    'data': data
});
onClear()

Method removes all user addresses. Example:

$.request('UserAddress::onClear');
  • Found the plugin useful on 8 Aug, 2021

    Hello dear all, I am using this Orders package in my store. I would like to know how to retrieve user specific orders and display it in customer account

  • author

    Replied on 9 Aug, 2021

    Hi!

    You can use Lovata.Buddies or RainLab.User plugins in your project. Orders plugin adds to User model order relation or order_list field with OrderCollection object.

    P.S. Please, use the following ways to receive our support:

  • Found the plugin useful on 1 Apr, 2021

    Hello I am having a problem. The request 'Cart::onRemove' does not remove an item from the cart if it has properties. I do it like this: let data = { 'cart': [id_elem] };

    $.request('Cart::onRemove', {
        'data': data,
        update: { 'cart': '.cart_modal' }
    });

    And I add like this: let data = { 'cart': [ { 'offer_id': id_offer.id, 'quantity': 1, 'property': { 'color': '111111' } } ] }; $.request('Cart::onAdd', { 'data': data, update: { 'cart': '.cart_modal' } });

  • author

    Replied on 7 Apr, 2021

    Hi Maria,

    Thx for your feedback. We'll help you in your the Github issue #151.

  • Found the plugin useful on 31 Dec, 2020

    Hi, great plugin. I have question. There is any backend validation for order form? Validation of email, name, address etc? I can't find information about it.

  • author

    Replied on 5 Jan, 2021

    Hi!

    We're happy you enjoy our products! Have a nice experience with Shopaholic!

    You can extend Order or User model and add validation rules.

    P.S. Please, use the following ways to receive our support:

  • Found the plugin useful on 4 Apr, 2020

    Hello! how can I use shipping restriction? "$obList = ShippingTypeCollection::make([1,2,10,15])->available(['state' => 'NY']);"- didn't work Thanks!

  • author

    Replied on 7 Apr, 2020

    The Orders for Shopaholic plugin doesn't have in-built functionality to limit the shipping types by countries and regions.

    The code example which has been provided by you is demonstrating how to create your custom restriction.

    P.S. Please, use the following ways to receive our support:

  • Found the plugin useful on 11 Feb, 2020

    Nice plugin.
    One question tho...how can I display tax on checkout page?
    Thanks in advance

  • author

    Replied on 12 Feb, 2020

    Hi!

    Thx for using Shopaholic products and for the positive feedback. As for your question, the correct way to get support is by creating an issue on GitHub or ask as on the #shopaholic channel in Slack or Discord.

  • Found the plugin useful on 18 Aug, 2019

    Thanks to the Lovata team for quality plugins!!!!

  • author

    Replied on 12 Feb, 2020

    Hi!

    We're happy you enjoy our products! Have a nice experience with Shopaholic!

  • Found the plugin useful on 23 Jul, 2019

    In my opinion this is the easiest way to make an online store. It’s hard to put all the flexibility in your head. All the same, this is not a completely ready-made solution, but a constructor. My settings were 15 minutes. Now we work with multi-currencies, it is very convenient. Thank.

  • author

    Replied on 23 Jul, 2019

    Ivan, thank you for using Shopaholic!

    Shopaholic follows October CMS philosophy of Developer Experience as the main value. Its goal to break the walls between the developer and the platform. We're happy you've found it easy customizable.

  • Found the plugin useful on 6 Jul, 2018

    Can someone please shed some light on how to add items to the cart please??

    The documentation says: $.request('Cart::onAdd', { 'data': data, 'update': {'cart-items': '.cart-item-wrapper'} });

    how to call this exactly?

    Thanks Matthew

  • author

    Replied on 6 Jul, 2018

    Hi Matthew!

    You can see example of using Cart component in code of demo theme.

    You can install local copy of demo site and study code of demo theme.

    Thank you for using Shopaholic! We're happy you enjoyed it!

1.33.1

Fixed logic of discount calculation in calculateItemDiscount method. Fixed description block in promo mechanism type field

May 21, 2024

1.33.0

Added color field to StatusItem

Apr 24, 2024

1.32.5

Fixed field list in price containers

Apr 01, 2024

1.32.4

Fixed an error saving promomechanism model properties. Remove nested form. Thanks for contribution Semen Kuznetsov (dblackCat)

Feb 13, 2024

1.32.3

Fixed weight calculation in orders. Thanks for contribution Nick Khaetsky.

Aug 04, 2023

1.32.2

Minor fix of integration with multisite.

Aug 03, 2023

1.32.1

Updated composer file

Jul 07, 2023

1.32.0

Added the ability to link shipping types, payment methods to different sites. Added site() method to ShippingTypeCollection, PaymentMethodCollection classes.

Jul 07, 2023

1.31.3

Fix errors for integration with v3. Thanks for contribution Nick Khaetsky.

May 30, 2022

1.31.2

Change lists method to pluck method. Thanks for contribution Nick Khaetsky.

Apr 05, 2022

1.31.1

Small fix.

Dec 10, 2021

1.31.0

Added search panel in user relation config (RainLab.User plugin)

Jul 28, 2021

1.30.0

Reduced count of database queries, if cache is empty. Requires Toolbox plugin version 1.32.0 and later.

May 02, 2021

1.29.0

Added composer.json to plugin

May 02, 2021

1.28.0

Added setting to disable clearing user cart after creating a new order. Thanks for contribution Sebastiaan Kloos.

Mar 31, 2021

1.27.0

Added payment events to AbstractPaymentGateway class. Fixed bugs.

Dec 29, 2020

1.26.0

Improved interface for adding an order position to order in backend. Thanks for contribution Nick Khaetsky.

Apr 21, 2020

1.25.0

Added the ability to automatically apply promo mechanisms to cart and order. Added the ability to link the promo mechanism with shipping types and payment methods. Added the ability to set an active payment method in "Cart" component. Adding mechanisms to increase the price of products and orders.

Mar 20, 2020

1.24.1

Fixed dynamic method in UserItem class. Requires Toolbox plugin version 1.28.1 and later.

Mar 20, 2020

1.24.0

Added "restore cart" field to PaymentMethod model. Added restoreFromOrder() method to CartProcessor class. Added dimensions and weight fields to OrderPosition model.

Feb 17, 2020

1.23.1

Added annotations for Subscriptions for Shopaholic plugin.

Jan 08, 2020

1.23.0

Added color to status. Added onSync(), onGetCartData() methods to Cart component. Added ability to create an order with an active price type. Thanks for contribution definer and pikanji.

Oct 21, 2019

1.22.1

Changed type of postcode field from int to string.

Jun 21, 2019

1.22.0

Added ability to create restrictions for payment methods. Added restrictions of payment methods by shipping type. Thanks for contribution Tsagan Noniev and Rubium Web.

May 11, 2019

1.21.0

Added onRestore method to Cart component.

Apr 09, 2019

1.20.0

Added ability to add multiple identical offers, but with different set of properties. Added ability to delete cart positions by ID. Added ability to create integration with API of delivery services. Added property fields in ShippingType model. Added ability to create restrictions for shipping types. Added restrictions of shipping types by position total price. Added email, user_data, shipping_address, billing_address, shipping_type_id, payment_method_id, property fields in Cart model. Thanks for contribution Tsagan Noniev and Rubium Web.

Mar 29, 2019

1.19.0

!!! Added Taxes. Added multicyrrency. Requires Shopaholic plugin version 1.21.0 and later.

Feb 27, 2019

1.18.0

Added calculate_per_unit setting parameter in PromoMechanism model.

Jan 20, 2019

1.17.0

Added shopaholic.shipping_type.get_price event. The event allows you to dynamically change the shipping price.

Dec 21, 2018

1.16.0

Added checking addresses for uniqueness before creating a new user address or order.

Dec 19, 2018

1.15.0

Added German language. Thanks for contribution Gerald.

Dec 18, 2018

1.14.3

Fixed OrderProcessor::EVENT_GET_SHIPPING_PRICE event. Thanks for contribution GitLog.

Nov 21, 2018

1.14.2

Fixed link to cancel button in backend (OrderPosition controller)

Nov 14, 2018

1.14.1

Changed type of "description" field in task table.

Nov 13, 2018

1.14.0

Added getCurrency() method in Cart component. Improved parameter generation for redirecting to order page in MakeOrder component. Added shipping_type_id parameter processing in onAdd, onUpdate, onRemove methods (Cart component)

Nov 09, 2018

1.13.0

Added Japanese language. Thanks for contribution pikanji.

Nov 07, 2018

1.12.1

Fixed logic for calculating old total price of order position without discounts.

Nov 05, 2018

1.12.0

Added supported types of order properties: number, rich editor, single checkbox, switch, balloon selector, tag list, radio.

Nov 02, 2018

1.11.4

Fixed creation of an order position via add() method.

Oct 24, 2018

1.11.3

Fixed update of price data before sending an order to the payment gateway

Oct 23, 2018

1.11.2

Fixed the logic of getting custom field values of the saved user address when creating an order.

Oct 17, 2018

1.11.1

Added annotations for integration with Coupons for Shopaholic, Discounts for Shopaholic, Campaigns for Shopaholic plugins.

Oct 16, 2018

1.11.0

Added PromoMechanism model. Added of opportunity to change price of order positions, shipping price, order total price, using promo mechanisms. Added user addresses. Added tasks with relation with orders, users.

Oct 15, 2018

1.10.2

Fixed labels in ShippingType controller breadcrumbs.

Sep 03, 2018

1.10.1

Remove links on lang file of Buddies plugin.

Aug 17, 2018

1.10.0

Add Validation trait to Order model.

Aug 09, 2018

1.9.1

Adds secret_key field to OrderItem object

Aug 08, 2018

1.9.0

Added type returned by methods in AbstractStore * classes

Aug 07, 2018

1.8.0

Add payment_token field to Order model

Aug 06, 2018

1.7.0

Improved integration with payment systems. Adds of shipping price filling from shipping type object, if shipping_price field value from request is empty.

Aug 01, 2018

1.6.4

Fix position type default value

Jul 12, 2018

1.6.3

Fix work with *Store classes in *Handler classes

Jul 11, 2018

1.6.2

Fix error in OfferOrderPositionProcessor class.

Jun 25, 2018

1.6.1

Fix error in OrderPage::get() method

Jun 21, 2018

1.6.0

Add classes: OrderCollection, OrderPositionCollection, StatusCollection, OrderItem, OrderPositionItem, StatusItem. Add StatusList component. Adding the ability to create custom properties for order positions. Adding the ability to attach users with orders. Adding the ability to create/update order positions in backend. Add filter order list (backend) by payment method, shipping type, created_at/update_at fields. Add "hasMany" relation in User model with Order model. Add "user_list" property in User model. Add "order" in UserItem class. Refactoring CartProcessor, OrderProcessor classes. Rename classes: CartElementCollection => CartPositionCollection, CartElementItem => CartPositionItem. Requires Toolbox plugin version 1.10.0 and later.

Jun 21, 2018

1.5.0

Update logic for new version of CResult class. Requires Toolbox plugin version 1.9.1 and later.

Apr 17, 2018

1.4.0

Add integration with RainLab.User plugin. Added sending emails to the user and managers after the order was created. Add events "shopaholic.order.created", "shopaholic.order.created.user.template.data", "shopaholic.order.created.manager.template.data". Requires Toolbox plugin version 1.7.0 and later.

Mar 11, 2018

1.3.1

Added check for isNested flag when expanding forms

Feb 23, 2018

1.3.0

Add "price" field in ShippingType model

Feb 11, 2018

1.2.1

Remove php short tags from orders/_price_block.htm

Jan 29, 2018

1.2.0

Add additional properties for Order model. Add settings for validation the email field as required.

Jan 27, 2018

1.1.0

The "rewrite" and "increase" flags are removed from the method of updating the quantity of items in the cart

Jan 27, 2018

1.0.5

$casts property is replaced with $jsonable property in the Order model

Jan 11, 2018

1.0.4

!!! Adding additional cache cleaning for the sorted list of payment methods and shipping types, after the creation of a new element. Requires Toolbox plugin version 1.3.0 and later.

Jan 08, 2018

1.0.3

Change method for generation secret_key field in Order model

Dec 24, 2017

1.0.2

Remove php short tags from orders/_price_block.htm

Dec 15, 2017

1.0.1

Fix permission tab label in config

Dec 08, 2017

1.0.0

Initialize plugin.

Dec 06, 2017