Alright, I have some programming experience but virtually none with PHP, other than what I've picked up playing with opencart. I want to change my flat rate shipping module into a percentage based module with a minimum. This doesnt seem like it should be too terribly hard to accomplish. From what I can see poking around flat.php, it gets the cost here:
Code: Select all
'cost' => $this->config->get('flat_cost'),
so I'm thinking change it to something like
and define the $with_percent variable something like this
Code: Select all
if ( $sub_total <= 70 ) {
$with_percent = 10
} else {
$with_percent = $sub_total * .15
}
so that if the order is under 70 bucks, it charges ten dollars shipping, if it's above, it charges 15%.
problems:
- i'm sure this syntax is nothing close to right
- not entirely sure how to access $sub_total
Any help turning this thought-dump into usable code would be much appreciated.