Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

GiftWrap module - Two easy(ish) questions


Recommended Posts



I've just installed the giftwrap module and was wondering if it could be hacked to multiply the cost of giftwrapping by the total items in the basket ( $cart->count_contents() )


This would calculate the gift wrapping on a per item basis.


I'm quite new to osCommerce but have been coding in PHP/MySQL for around 3/4 years and I am comfortable modifying the code. The question is at what point does this value get calculated ? and is this only done in one place (like inside a class) ?



Okay second question. I have noticed this in the code for the giftwrap module:


// add gift message

if ($HTTP_GET_VARS['action'] == 'update') { ..........


It would seem that the system supports adding a message to your gift - although I can't see how you turn this feature on. Any ideas ?


Thanks in advance for any help you can give.

Link to comment
Share on other sites

Sorted one issue:


'shipping_method' => $shipping['title'],

'shipping_cost' => $shipping['cost'],

'giftwrap_method' => $giftwrap_info['title'],

'giftwrap_cost' => $cart->count_contents()*$giftwrap_info['cost'],

'subtotal' => 0,


The bit in red above added to classes/order.php seems to do the trick with quantity based gift wrapping.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...