Shopping Cart Operations > General Support

About the Per Item Shipping Option

(1/2) > >>

franz2008:
hi there

i just wanna ask if is there any possible to make a Handling fee for Per Item Shipping (other than Shipping cost)

i have some images for it :



and this one too:



i hope you could help me on it

Thanks

franz2008:
is there anyone who can help me???

elpas0:
hi there

it is easy to implement

1. edit extensions\default_per_item_shipping\config.xml

find

--- Code: ---<item id="default_per_item_shipping_cost">
            <type>input</type>
            <default_value></default_value>
        </item>
--- End code ---
and insert after it

--- Code: ---        <item id="default_per_item_shipping_fee">
            <type>input</type>
            <default_value>0</default_value>
        </item>
--- End code ---
we add new parameter in extension config.

2. add translation for this parameter.
edit extensions\default_per_item_shipping\admin\language\english\default_per_item_shipping\default_per_item_shipping.xml


--- Code: ---<definition>
    <key>default_per_item_shipping_fee</key>
    <value><![CDATA[Fee:]]></value>
  </definition>
--- End code ---

3. now we need to change shipping cost calculation
edit extensions\default_per_item_shipping\storefront\model\extension\default_per_item_shipping.php

find

--- Code: ---$quote_data['default_per_item_shipping'] = array(
        'id'           => 'default_per_item_shipping.default_per_item_shipping',
        'title'        => $this->language->get('text_description'),
        'cost'         => $this->config->get('default_per_item_shipping_cost') * $this->cart->countProducts(),
          'tax_class_id' => $this->config->get('default_per_item_shipping_tax_class_id'),
'text'         => $this->currency->format($this->tax->calculate($this->config->get('default_per_item_shipping_cost') * $this->cart->countProducts(), $this->config->get('default_per_item_shipping_tax_class_id'), $this->config->get('config_tax')))
      );
--- End code ---

and change it to

--- Code: ---$quote_data['default_per_item_shipping'] = array(
        'id'           => 'default_per_item_shipping.default_per_item_shipping',
        'title'        => $this->language->get('text_description'),
        'cost'         => $this->config->get('default_per_item_shipping_cost') * $this->cart->countProducts() + $this->config->get('default_per_item_shipping_fee') ,
          'tax_class_id' => $this->config->get('default_per_item_shipping_tax_class_id'),
'text'         => $this->currency->format($this->tax->calculate($this->config->get('default_per_item_shipping_cost') * $this->cart->countProducts() + $this->config->get('default_per_item_shipping_fee'), $this->config->get('default_per_item_shipping_tax_class_id'), $this->config->get('config_tax')))
      );
--- End code ---

franz2008:
Thank you so much for it and it works  :) :)

scutty99:
Hi,

I have entered the info as per instructions but where do I put in the value for the handing charge, as it does not add anything at the moment?

sorry I am new to this

Pete

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Social Login Mod