Author Topic: About the Per Item Shipping Option  (Read 9831 times)

Offline franz2008

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
About the Per Item Shipping Option
« on: January 02, 2012, 10:29:27 PM »
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

Offline franz2008

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: About the Per Item Shipping Option
« Reply #1 on: January 04, 2012, 03:12:00 AM »
is there anyone who can help me???

Offline elpas0

  • Newbie
  • *
  • Posts: 13
  • Karma: +3/-0
    • View Profile
Re: About the Per Item Shipping Option
« Reply #2 on: January 04, 2012, 04:21:23 AM »
hi there

it is easy to implement

1. edit extensions\default_per_item_shipping\config.xml

find
Code: [Select]
<item id="default_per_item_shipping_cost">
            <type>input</type>
            <default_value></default_value>
        </item>
and insert after it
Code: [Select]
        <item id="default_per_item_shipping_fee">
            <type>input</type>
            <default_value>0</default_value>
        </item>
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: [Select]
<definition>
    <key>default_per_item_shipping_fee</key>
    <value><![CDATA[Fee:]]></value>
  </definition>

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: [Select]
$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')))
      );

and change it to
Code: [Select]
$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')))
      );


Offline franz2008

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: About the Per Item Shipping Option
« Reply #3 on: January 05, 2012, 12:22:30 AM »
Thank you so much for it and it works  :) :)

Offline scutty99

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: About the Per Item Shipping Option
« Reply #4 on: December 04, 2012, 03:21:43 AM »
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

Offline abolabo

  • core-developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2050
  • Karma: +320/-13
  • web for all, all for web!
    • View Profile
    • AbanteCart
Re: About the Per Item Shipping Option
« Reply #5 on: December 04, 2012, 12:36:30 PM »
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

hi.
Do you see additional field fee after changing of extensions\default_per_item_shipping\config.xml on extension edit page?
“No one is useless in this world who lightens the burdens of another.”
― Charles Dickens

 

Powered by SMFPacks Social Login Mod