Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: photo_shop shipping mod?  (Read 4389 times)

0 Members and 1 Guest are viewing this topic.

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
photo_shop shipping mod?
« on: May 13, 2008, 03:14:15 pm »

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?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: photo_shop shipping mod?
« Reply #1 on: May 16, 2008, 03:23:30 pm »

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

jaus

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 84
Re: photo_shop shipping mod?
« Reply #2 on: May 20, 2008, 11:12:21 pm »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.