photo_shop shipping mod? photo_shop shipping mod?
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

photo_shop shipping mod?

Started by jaus, May 13, 2008, 03:14:15 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jaus

The shipping calculation in the photo_shop plug-in seems to calculate 'per item' shipping based on a quantity of '1' for each item, regardless of the quantity in the order  (am I missing something?).

I have read some posts and looked at the calculate_shipping() function in the plug-in, and I did figure out how to make the shipping = global + per item shipping, but I don't see how to calculate per item shipping based on 'per item' x 'quantity'.

I want total shipping to be equal to global shipping+ ((per item shipping) x (quantity of that item))

Is there a mod that anyone can suggest for someone with minimal web coding experience?

Stramm

within the foreach loop
$_SESSION['photoshop']['cart'][$key]['amount']
holds the amount of the item with the id $key
$SHOP_CONFIG[$item_id]['price']
holds the price of the item ($item_id is for the better readability $_SESSION['photoshop']['cart'][$key]['id'])

jaus

Actually, I needed the per item shipping code rather than the item price, but I found that in the function and with the 'amount' code I was able to make my mod.
Thanks.