Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Calculating shipping costs as percentage of price


Guest

Recommended Posts

Posted

Does anyone know how to modify the shipping calculations so that I can set the shipping costs at 15% of the purchase price?

Posted

in module/shipping

take table rate

and to this code

if (MODULE_SHIPPING_TABLE_MODE == 'weight') {

$shipping = $shipping * $shipping_num_boxes;

}

 

$this->quotes = array('id' => $this->code,

'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE,

'methods' => array(array('id' => $this->code,

'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,

'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));

replace with

if (MODULE_SHIPPING_TABLE_MODE == 'weight') {

$shipping = $shipping * $shipping_num_boxes;

}

$shipping = $order_total * 15/100 ;

$this->quotes = array('id' => $this->code,

'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE,

'methods' => array(array('id' => $this->code,

'title' => MODULE_SHIPPING_TABLE_TEXT_WAY,

'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...