Category Archives: Modules

How to sum the cost up of the two methods?

To sum up the cost of several methods, you can use the Grouping Option. Here are the steps to be followed:

  1. Go to X-Shippingpro -> Global setting -> Grouping, Now select a group e.g. Group1 to SUM

2. Now we have a group1 and we have to assign group method/member for this group.

3. To assign a method into a group, go to the general tab of a method, select the Group to Group1.

4. When X-Shippingpro finds several methods belongs to the same group during checkout,  X-Shippingpro takes the appropriate action and shows one method instead of showing them all.

For example, you have a `Method-1` and `Method-2` methods.  If customer want to purchase only from the `Method-2` or `Method-2`, group mode will not come into action. 

But when a customer wants to purchase from both `Method-1` and `Method-2`, it meets the group criteria and grouping will come into action. So shipping cost will be summed up and it displays the summed cost instead of showing separately.

Creating Complex Discount using X-Feepro Equation

Buy two and get third one free.

  • In the price-setting tab, Select the Fee/Discount By to Quantity
  • Now add a quantity range as follows as like the screenshot

  • On the Final Equation field, please enter following equation

-({subTotalAsPerProductRule}/{quantityAsPerProductRule}) * {noOfBlock}

That’s all

Buy two at a fixed cost of $100

  • In the price-setting tab, Select the Fee/Discount By to Quantity
  • Now add a quantity range as follows as like the screenshot
  • On the Final Equation field, please enter following equation

{noOfBlock} * 100 – {blockPriceAsc}

That’s all

Examples of X-Combination

Example 1: Buy two and get one free to specific Categories

  1. Create a new combination
  2. In the Product Combination tab, click the Add Category button and choose the applicable categories
  3. Enter The number of purchases required of a product to 2

That’s all.


Attention

The number of purchases required of a product represents the minimum quantity of a single product that is required to purchase to avail offer. For example, if you enter The number of purchases required of a product to 2, that indicates the minimum quantity of a particular product is 2. It does NOT mean any two items out of any products of the given categories. Please check example 2 that is different than example 1 .

Example 2: Buy ANY two from category A and get one free

  1. Create a new combination
  2. In the Product Combination tab, click the Add Category button and choose category A and Enter The number of purchases required of a product to 1
  3. In the Product Combination tab, click the Add Category button and choose category A and Enter The number of purchases required of a product to 1
  4. Under the Offer Products tab, Enter Number of offer products to 1
  5. Under the Offer Products tab, define the offers products you want to pick out one of them. To add Offer products, simply click the button Add offer products and choose the applicable products.

That’s all.

Note: Please check the step 2 and 3, I have added the same steps twice that indicate one item of any product of Category A and another item of any products of category A as well. So it will give the freedom to customers to pick any two items from any number of products of category A.

Example 3: Buy two from category A or B and get one free

  1. Create a new combination
  2. In the Product Combination tab, click the Add Category button and choose category A, B and Enter The number of purchases required of a product to 2
  3. Under the Offer Products tab, enter Number of offer products to 1
  4. Under the Offer Products tab, define the offers products you want to pick out one of them. To add Offer products, simply click the button Add offer products , and choose the applicable products.

That’s all.

Note: This indicates the offer is valid to the products of category A and B. The minimum purchase required of each product is 2.

Example 4: Buy ANY two from category A or B and get one free

  1. Create a new combination
  2. In the Product Combination tab, click the Add Category button and choose category A, B and Enter The number of purchases required of a product to 1
  3. In the Product Combination tab, click the Add Category button and choose category A, B and Enter The number of purchases required of a product to 1
  4. Under the Offer Products tab, enter Number of offer products to 1
  5. Under the Offer Products tab, define the offers products you want to pick out one of them. To add Offer products, simply click the button Add offer products , and choose the applicable products.

That’s all.
[Similar to example 2]

Example 5: Buy one from category A and two from category B and get one discounted products.

  1. Create a new combination
  2. In the Product Combination tab, click the Add Category button and choose category A and Enter The number of purchases required of a product to 1
  3. In the Product Combination tab, click the Add Category button and choose category B and Enter The number of purchases required of a product to 2
  4. Under the Offer Products tab, enter Number of offer products to 1
  5. Under the Offer Products tab, define the offers products you want to pick out one of them. To add Offer products, simply click the button Add offer products , and choose. Finally, adjust the discount amount you want to offer.

Example 6: Buy two and get 50% discount of one product to specific Categories

  1. Create a new combination
  2. In the Product Combination tab, click the Add Category button and choose the applicable categories
  3. Enter The number of purchases required of a product to 2
  4. Under the Offer Products tab, Enter discount amount to 50%

That’s all.

Example 7: Buy One and get two free to specific Categories

  1. Create a new combination
  2. In the Product Combination tab, click the Add Category button and choose the applicable categories
  3. Enter The number of purchases required of a product to 1
  4. Under the Offer Products tab, enter Number of offer products to 2

That’s all.

Example 8: Buy two from category A and pick a gift products from X, Y and Z

  1. Create a new combination
  2. In the Product Combination tab, click the Add Category button and choose the category A
  3. Enter The number of purchases required of a product to 2
  4. Under the Offer Products tab, enter Number of offer products to 1
  5. Under the Offer Products tab, pick Select offer products type to Define offer products.
  6. Then click the Add offer Products button and choose the products X, Y, and Z.
  7. Finally, you can adjust the discount amount in percentage or a flat amount for each offered product.

That’s all.

Example 9: Buy One from category A and One from Brand B and pick a gift products from X, Y and Z

  1. Create a new combination
  2. In the Product Combination tab, click the Add Category button and choose the category A and Enter The number of purchases required of a product to 2
  3. In the Product Combination tab, click the Add Manufacturer button and choose the manufacturer B and Enter The number of purchases required of a product to 2
  4. Under the Offer Products tab, enter Number of offer products to 1
  5. Under the Offer Products tab, pick Select offer products type to Define offer products.
  6. Then click the Add offer Products button and choose the products X, Y, and Z.
  7. Finally, you can adjust the discount amount in percentage or a flat amount for each offered product.

That’s all.

How to integrate Web Money in X-Payment

You can integrate Web money in xpayment in following ways:

  1. Create a new payment method in x-payment
  2. On the General setting, Choose your Order status that you want to apply when the purchase is successful.
  3. On the integration tab, Select Integration Type “Redirect/Forward to Payment URL
  4. Enter URL to redirect is: https://merchant.wmtransfer.com/lmi/payment_utf.asp
  5. Select Method Type: POST
  6. On the Data(s) field, enter following JSON data and adjust your LMI_PAYEE_PURSE accordingly.
{
    "LMI_PAYEE_PURSE" : "ADD_YOUR_PAYEE_PURSE",
    "LMI_PAYMENT_DESC" : "Payment to {storeName}",
    "LMI_PAYMENT_NO" : "{orderId}",
    "LMI_PAYMER_EMAIL": "{email}",
    "LMI_PAYMENT_AMOUNT" : "{orderTotal}",
    "LMI_SUCCESS_URL" : "{returnURL}",
    "LMI_FAIL_URL": "{storeUrl}index.php?route=checkout/checkout",
    "LMI_SUCCESS_METHOD" : "POST"
}

7. On the Payment success condition field, enter the following condition:

LMI_PAYMENT_NO != ''
Complete Integration example of webmoney in X-payment

8. Please download this ocmod and install it through the extension installer and refresh your ocmod list. This is needed as WebMoney does not return to the success page properly.

How to integrate Perfect money in X-Payment

You can integrate Perfect money in xpayment in following ways:

  1. Create a new payment method in x-payment
  2. On the General setting, Choose your Order status that you want to apply when the purchase is successful.
  3. On the Criteria setting Tab, uncheck the checkbox “For any” of the option Currency Rule. Now choose your applicable currency. This is needed as Perfect Money is not available to all currencies.

4. On the integration tab, Select Integration Type “Redirect/Forward to Payment URL

5. Enter URL to redirect is: https://perfectmoney.is/api/step1.asp

6. Select Method Type: POST

7. On the Data(s) field, enter following JSON data and adjust your PAYEE_ACCOUNT accordingly.

{
    "PAYEE_ACCOUNT" : "U17290487",
     "PAYEE_NAME" : "{storeName}",
    "PAYMENT_ID" : "{orderId}",
    "PAYMENT_AMOUNT" : "{orderTotal}",
    "PAYMENT_UNITS" : "{currencyCode}",
    "PAYMENT_URL" : "{returnURL}",
    "NOPAYMENT_URL": "{storeUrl}index.php?route=checkout/checkout",
    "PAYMENT_URL_METHOD" : "POST",
    "NOPAYMENT_URL_METHOD" : "LINK"
}

8. On the Payment success condition field, enter the following condition:

PAYMENT_ID != ''
Full Integration Example of perfect money in X-Payment

How to customize the theme of Ribbon and Countdown in X-Discount

Round Countdown

It is possible to change the theme colour of the ribbon and countdown in X-Discount. To change your theme, you will have to put your custom CSS rules to the field Custom CSS located in the Global Setting tab of the X-Discount.

Custom CSS in X-Discount

Here are examples of the custom ribbon and countdown:

Example 1: Red Round Ribbon

Required CSS rules

.xdiscount_ribbon {
     background: #fc3f00;
     font-weight: bold;
     border-radius: 50%;
 }
 .xdiscount_ribbon:before {
     display:none;
 }

Example 2: Yellow Ribbon in right side

Required CSS rules

.xdiscount_ribbon_container {
     right: 3px;
     left: auto;
 }
 .xdiscount_ribbon {
     background: #fcd800;
     color: #111;
     font-weight: bold;
 }
 .xdiscount_ribbon:before {
     display:none;
 }

Example 3: Countdown white background

Required CSS rules

.xdiscount_content ._box {
     border: 1px solid #319cd1;
     background-color: #f5f5f5;
     position: relative;
 }
 .xdiscount_content ._box ._box_label {
     position: absolute;
     bottom: 2px;
     width: 100%;
 }
 .xdiscount_content ._box ._box_content {
     padding: 15px 0 25px 0;
     background-color: #fff;
     color: #3098cc;
 }

Example 4: Black Countdown

Required CSS rules

.xdiscount_content ._box {
     border: none;
     background-color: transparent;
 }
 .xdiscount_content ._box ._box_content {
     padding: 15px 0;
     background-color: #020202;
     box-shadow: 0 0 5px 0px rgba(0,0,0,0.5);
 }

Example 5: Gradient Countdown

Required CSS rules

.xdiscount_content ._box {
     border: 1px solid #7bc2ec;
     background-color: #f5f5f5;
 }
 .xdiscount_content ._box ._box_content {
     font-size: 22px;
     padding: 14px 0px;
     background: linear-gradient(0deg, #3f6a7f, #84d6ff);
     color: #fff;
     box-shadow: 0px 0px 5px 0px rgb(77, 171, 228);
 }
 .xdiscount_content ._box ._box_label {
     background: #e4f6ff;
     border-bottom: 1px solid #7bc2ec;
 }

Example 6: Round Countdown

Required CSS rules

.xdiscount_content ._box {
     border: none;
     background-color: transparent;
     position: relative;
 }
 .xdiscount_content ._box ._box_content {
     padding: 22px 0;
     background-color: #d7f2ff;
     color: #101010;
     border-radius: 50%;
     height: 80px;
     font-size: 28px;
     border: 3px solid #319cd0;
 }
 .xdiscount_content ._box ._box_label {
     position: absolute;
     bottom: 8px;
     width: 100%;
     color: #1c84b7;
 }

Example 7: Green Countdown

Required CSS rules

.xdiscount_content ._box {
    border: 1px solid #ccc;
    background-color: #3fbf91;
    padding: 5px;
}
.xdiscount_content ._box ._box_content {
    background-color: #288267;
    color: #fff;
}
.xdiscount_content ._box ._box_label {
    color: #fdfdfd;
    padding: 0px 0px 2px 0px;
}

Example 7: Without Hour Box

Countdown without hour box

Required CSS rules

.xdiscount_content ._days {
    display: none;
}
.xdiscount_content ._box {
    flex-basis: 33%;
}

How to select css selector for discount ribbon and offer countdown in X-Discount

As you know opencart has many theme on the marketplace and it is quite impossible to add predefined patch to all available templates. By X-Discount’s offer countdown and discount ribbon has been configured for default theme. But it is possible to show countdown and ribbon on any theme. In the Ribbon & Countdown Setting tab of the X-Discount module allow you defined your own css selector where the ribbon or countdown would appear.

Let me show you how to find the selector using chrome debugging tool. Let’s assume you want to place ribbon in the product listing page. To do so, please navigate to any product listing page. Then click the mouse right button over the any product box and then click the Inspect option. It will show up chrome debugging tool. Now find out a CSS Class that must be unique so it can be used to differentiate product box across the page. For example, for the default theme css selector .product-layout is the unique.

Selector for the Product Box in default theme

Once you choose the selector for the product box, you will have to find out a selector where the X-discount actually put the ribbon in. For example, in default theme it could be .product-thumb .image

Selector for ribbon in the listing page

Similarly you can get your selector for the details. Note in the detail page, the countdown would be placed before the given selector. For example, in the default theme, the selector #product could be good choice.

Countdown in the product detail page

However you have any problem to get your selector, don’t hesitate to request for support. Have a good day!

How does Cumulative Price work in XShippingpro?

If you set final cost to Cumulative,  xshippingpro will sup up cost of all unit rows and even applicable Additional Price. Let look into following setting:

Before continue into further lets discuss two things.

How doesXshippingpro calculate Per Unit Cost?
If you noticed, I have entered Per Unit Block is 1 for the second unit row.  Since cost is defined $2 to that row. So each block cost would be $2. Lets calculate how may blocks out there.
Start: 10.1
End: 20
So Total blocks:  (End – Start) / Per Unit Block = (20 -10.1) / 1 = 9.9 i.e Round value: 10
( One thing is worth to inform that Xshippingpro would not round if you would have set Allow Partial is Yes )
Therefore, Total Cost: 10  x $2 = $20
How does Xshippingpro calculate Additional Price?
If xshippingpro find a match among the unit ranges, it will not move forward to Additional Price. But if there no proper matching is found, xshippingpro will move ahead to Additional Price rule and try to calculate shipping cost depending on its value.
By default, xshippingpro calculate additional cost per 1 Unit e.g 1 KG in this case (or whatever Rate Type you defined. If you define Rate type is Quantity, then Per 1 Item) basis unless you define Per Unit Block in the last unit row.
For example, there is no Per Unit Block  defined to the last unit range row. So additional price will be calculated for per 1 KG since Rate type is Weight. Lets say Additional Price is $10, that means cost for every KG is $10
If there was Per Unit block defined to the last unit range row, it would calculate additional price per Per Unit block basis. For example, if it was defined 2, additional price would calculate per 2 KG.  Lets say Additional Price is $10, that means cost for every 2KG is $10

Let’s proceed to main discussion. Lets say we have cart weight 60KG so what would the final shipping cost according to above setting?

1.  First row:  $5
2.  Second row:  $20      (No of blocks: 10 and Cost per block: $2 ,Therefore, 10 x $2 = $20 )
3.  Third row:  $20
Yes, we have still some weight 10KG pending to be calculated  even after all unit rows are done. Because our last row’s upper limit is 50KG but our cart weight is 60KG
4. Additional Shipping Cost: $50   ( Additional Price $5 and we have 10KG to be calculated per 1 KG basis)
Since Final Price cumulative so lets sum up item 1 to 4: ( $5 +$20 + $20 + $50) = $95
Therefore, Final shipping cost for 50KG weight would be $95