Monthly Archives: August 2016

Few products are free and few products are paid

I have two products Prod A and Prod B.

Prod A is always FREE and shipping should not be calculated for it.

When I put both products in the cart, the shipping should only be applied to Prod B at different values. For example: Prod B cost €10 the shipping = €5. Prod B x 2 = €20 the shipping = €7. If Prod B x 2 has Prod A in the cart the shipping should still be €7.

Thanks for your question. You need two shipping methods. One for Free products (i.e Product A) and another for Paid products (i.e Product B). Also we don’t want to show Free shipping if Paid product in the cart. For that, we will have to use Group mode option. So lets first set Group  mode option

 In Global setting -> Group Option tab of xshippingpro,  Please select Group1 is Highest.
Now lets create Free method
Free Method
 
1. Create new method and provide a name
2. In general setting, select Group is Group1
3. In Products/Category tab, select product rule “Any of the selected products with others”. Choose your product A
4. In Price setting tab, select Rate type is Flat. Enter Price 0
Paid Method
 
1. Create another method and provide a name
2. In general setting, select Group is Group1
3. In Products/Category tab, select product rule “Any of the selected products with others”. Choose your product B
4. In Price setting tab, select Rate type is Quantity- Method Specific. Enter Following unit ranges
Start      End      Cost      Per Unit Block       Allow Partial
0            1            5                   0                         NO
1             2          7                   0                           NO
and so on…

Always display sub-categories in left side in opencart

By default sub-categories won’t be displayed until parent category become active. If you want to  keep sub-categories visible always, this hacks for you.

You need to modify two files.

Controller

catalog/controller/extension/module/category.php   [OC 2.3.x]
catalog/controller/module/category.php   [OC < 2.3 ]

Find following codes

Now replace above codes by following

 

View

catalog/controller/extension/module/category.tpl   [OC 2.3.x]
catalog/controller/module/category.tpl   [OC < 2.3 ]

You can replace all codes of template file by following

Good luck!

Moving Currency Selection from header to footer in opencart

If you want to move Currency selection dropdown from header to footer, you will need to following two files:

  1. catalog/controller/common/footer.php  Please add following code

Now  $currency is available inside catalog/view/theme/YOUR_THEME/template/common/footer.tpl so you can place it whatever you want in footer.tpl file i.e you will have place following code