shipping method variations

  • Posts: 149
  • Thank you received: 0
8 years 8 months ago #231327

-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8

Hi please help me to set up my shipping methods for a bike store i am getting confused.


the situation is that we have the bicycles and the accessories, parts, clothing.

we need to have

- Free shipping on accessories, parts, clothing over 20£ below 20£ will be 5£ charge
- For the bicycles we have 3 categories. every category has different shipping cost 10£, 15£, 20£
- when the user has a bicycle and accessory in his cart we should calculate only the bicycles shipping cost and ignore the accessories shipping.


please advice.

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
8 years 8 months ago #231364

Hello,
For the 2 first points a solution can be to :
1.
- Create 4 warehouses via "Hikashop->System->Warehouses", 1 for accessories, parts, clothing and 3 for each bicycle categories
- Add these warehouses to the good products

2.
- Create 5 shipping methods
- 1 with the "accessories,.." warehouse with the "Maximum Price" option set to 20 and a free price
- 1 with the "accessories,.." warehouse with the "Minimum Price" option set to 20 and a price of 5

- 1 for each bicycle category with the good "bicycles" warehouse and the good price

3. For the last point the solution will probably be to directly edit the code of the Manual shipping method plugin which will require development skills.

Please Log in or Create an account to join the conversation.

  • Posts: 149
  • Thank you received: 0
8 years 8 months ago #231484

thank you very much Mohamed for your reply .

could advice more about point 3 please?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 8 months ago #231487

Hi,

You can find the code to edit in the file administrator/components/com_hikashop/helpers/helper.php
There you would need to change the code of the function onShippingDisplay where the shipping method price is calculated with the code:

if(!isset($rate->shipping_params->shipping_virtual_included) || $rate->shipping_params->shipping_virtual_included) {
				if($rate->shipping_params->shipping_price_use_tax)
					$price = $shipping_prices->all_with_tax;
				else
					$price = $shipping_prices->all_without_tax;
			} else {
				if($rate->shipping_params->shipping_price_use_tax)
					$price = $shipping_prices->real_with_tax;
				else
					$price = $shipping_prices->real_without_tax;
			}
			
			if($rate->shipping_currency_id != hikashop_getCurrency()){
				$rate->shipping_price = $currencyClass->convertUniquePrice($rate->shipping_price, $rate->shipping_currency_id, $rate->shipping_currency_id);
				$rate->shipping_currency_id_orig = $rate->shipping_currency_id;
				$rate->shipping_currency_id = hikashop_getCurrency();
			}
			if(bccomp($price, 0, 5) && isset($rate->shipping_params->shipping_percentage) && bccomp($rate->shipping_params->shipping_percentage, 0, 3)){
				$rate->shipping_price = $rate->shipping_price + $price * $rate->shipping_params->shipping_percentage / 100;
			}
			$rate->shipping_price = $currencyClass->round($rate->shipping_price, $currencyClass->getRounding($rate->shipping_currency_id, true));

Please Log in or Create an account to join the conversation.

  • Posts: 149
  • Thank you received: 0
8 years 8 months ago #231508

with that way any changes will not be lost in future upgrades, right ?

also i am not able to select a warehouse from manual shipping plug in drive.google.com/a/webarts.com.cy/file/d...ms/view?usp=drivesdk

Last edit: 8 years 8 months ago by webarts.

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
8 years 8 months ago #231511

Hi,

1. You would loose the changes if you do that directly in the manual.php file.
But what you can do is duplicate the plugin in a manual2 plugin (renaming the folder, the files, the PHP class, etc) and install that manual2.php and add that function in it so that the files of the plugin won't be overwritten in the future when you update HikaShop.

2. Did you create warehouses ? The popup for the zone selection work ?

Last edit: 8 years 8 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 149
  • Thank you received: 0
8 years 8 months ago #232281

2. yes Nicolas i create warehouses. you have admin access you can check it please i am sending you an email

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
8 years 8 months ago #232319

Hello,
Your issue was coming from a "Popup mode" compatibility, so I have changed the "Popup mode" option to "Bootstrap" via "Hikashop->System->Configuration->Display".

Please Log in or Create an account to join the conversation.

  • Posts: 149
  • Thank you received: 0
8 years 8 months ago #232334

i am able to select only the first warehouse, i am not able to select the rest.

check my video screencast.com/t/ZzJwVhmd

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
8 years 8 months ago #232364

Hello,
It seems like your video can't be read. Also, note that you can select only ONE warehouse through the "warehouse" option of your shipping method configuration page.

Please Log in or Create an account to join the conversation.

Time to create page: 0.095 seconds
Powered by Kunena Forum