Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] "osC_GiftWrap_v1.0"


Guest

Recommended Posts

===============================================

 

osC_GiftWrap Module v1.0

 

===============================================

 

OVERVIEW

 

There has always been a lack of solutions available for offering a GiftWrap Option for your customers orders. I found a few suggestions in the osC Forums, but they are more like "work-arounds", not the "REAL THING".

 

So, I decided to write one! I spent alot of time getting this to function correctly. It wasn't easy. Anyone that is familiar with the osCommerce checkout process knows what I mean.

 

If you find any bugs or errors, please email me.

 

I must say this, though... I was VERY disappointed when I posted messages here the osCommerce Forum asking for a bit of help when I got stuck... and absolutely NO ONE from the Community offered any assistance what-so-ever! :( So this is all me.

 

We should all be working together in the single goal of advancing this great product!

 

===============================================

 

WHAT WILL IT DO?

 

This GiftWrap Module Addon will provide the option of adding GiftWrap to the Order during the Checkout Process.

 

<- osCAdmin ->

 

This Addon contains...

1 new Order Total Module - ot_giftwrap.php

2 new GiftWrap Modules - giftwrap.php and nogiftwrap.php

1 new Class file - Gift.php

 

All of which are controlled via osCAdmin under Modules. You will see that a new GiftWrap Option will appear in osCAdmin under Modules and a new GiftWrap selection in Modules -> Order Totals. Each of these new Modules needs to be activated to work correctly! Make sure you adjust your Order Total Sort Options to display your Order Total options in the right order.

 

<- Checkout ->

 

A new box is created on the Checkout Shipping Page asking... "Would like to GiftWrap your Order?" There are two options, GiftWrap or No GiftWrap. Each with an associated cost configured in osCAdmin. The GiftWrap amount is applied to the Order and appears on the Checkout Confirmation Page, both in the Shipping Summary and in the Order Totals.

 

This same information will be included on the Customers Order Invoice and Packing Slip.

 

===============================================

 

REMARKS

 

Please remember that this is osC_GiftWrap Module v1.0!

I am presently working on a future release with more features, such as...

 

-> checkbox selection instead of the radio buttons.

-> Add a "GiftCard" Message - A Personalized Message or Greeting to the Recipient

-> Free GiftWrap with Purchase Amount

-> Choice of Wrapping Paper

 

If you have any suggestions to make this osC GiftWrap Module better, let me know... I am VERY open to suggestions. Please eMail me.

 

===============================================

Link to comment
Share on other sites

  • Replies 143
  • Created
  • Last Reply

Top Posters In This Topic

I'll download it now and install it tonight, I'll get back with ya!

 

Thanks.

BTW I would have loved to help you when you needed it but I didn't know how to do it myself

Link to comment
Share on other sites

Hi ugottasalsa

 

Allthough at the moment i have no need of this particular addin i did download after reading your posts asking if anyone had tested.

 

with some minor alterations to the install help text i did get it installed on a non live site with no major problems and from the little ability i have on local system for testing it seems for now ok.

 

Sugestion:

The folder sequence the files are supplied in is incorrect and while this may not matter to some it matters to some as well.

 

The written instructions while direct have a few errors that would make install for uninitiated awkward at the least.

 

I would sugest that you attempt to install from your directions to find the problems if possible on a clean osc copy.

 

Overall:

Excellant :)

The above faults while valid will not stop the addin from being used i am sure but the sugestions may help with any further releases.

Personally i think its great and if i ever have a need to wrap one of my houses or cars i will certainly look at this as the option to use :)

 

Good Job... CYA

Link to comment
Share on other sites

well I couldn't get it to work.

Doesn't have a radio button so the customer can choose and it doesn't charge giftwrap or shipping charges now.....If someone gets it loaded and it works, let me know. I can't figure it out!

Link to comment
Share on other sites

Hi baresinsations,

 

The options for wrap or no wrap should be on the first page of the checkout system as the first option ( checkout_shipping.php )

 

The cost of wrapping $5.00 is carried through however it is not listed within the subtotals. (This should be altered to show the cost etc )

 

Anyways if you go through your instructions i think the ones needed are within the first few instructions given. You may find where you went wrong or a reason for its failure.

 

I am more than willing to help out if i can CyA :)

Link to comment
Share on other sites

I found a few of my mistakes and now all is working but the sort order. I do not want Yes Gift Wrap on top and set as default. I just haven't got this one to work correctly even though I used the sort order on the giftwrap modules.

Link to comment
Share on other sites

Got everything working now thanks to Randy.

 

How did you handle the non exisiting code that ya need to look for.

 

Example

 

CATALOG/CHECKOUT_SHIPPING.PHP

 

<?php

if (tep_count_shipping_modules() > 0) {

?>

 

I went line for line and did not find that line. Did I miss something. I know it's late and I have been working for 18 hours. Just would like to offer my customers gift wrap.

 

Any Help would be appericated.

 

 

:lol:

 

Thanks

 

kmcar

Link to comment
Share on other sites

Kevin,

 

I'm on vacation right now and not at my desktop so I'm not sure what I did. Ask Randy maybe he'll remember. As far as the code you are referring to. It is there, that wasn't where I was having a prob at.

Link to comment
Share on other sites

Hey Kevin...

 

What version of checkout_shipping.php are you using? Take a look at the top of the file and note the date that the file is labeled with. I went back and compared 4 different checkout_shipping.php files from 4 different snapshot dates... 12/20/02, 1/10/03, 2/11/03 and MS1.

 

It seems between 12/20/02 and 1/10/03, there were some changes made to the checkout_shipping file. If you would like to send me your checkout_shipping.php file, I will tell you where it needs to go.

 

eMail me the file... [email protected]

 

-R

Link to comment
Share on other sites

  • 2 weeks later...
Ive just installed this mod on a MS1 release.

 

Great very handy mod :)

 

It's great ... In the future I hope that they change it a little to make it per item instead of per order.

 

Kevin

Link to comment
Share on other sites

Having problems with this mod. I thought it all worked well but now it won't add my tax to the total order. I've worked for a week now trying to figure out why my tax does not add to the total. I uploaded my orignal classes/orders.php file and now it works. If I use the modified orders.php for giftwrap it won't add the tax to the total. So something is wrong with the classes/order.php file in giftwrap mod.

Link to comment
Share on other sites

First off... is GiftWrap showing up on the checkout_confirmation AND its not adding the TAX?

 

At the end of the /classes/order.php file, this is the bit of code that handles the calculation of subtotal, shipping, (giftwrap), tax and total...

 

****** ORIGINAL CODE ******

     if (DISPLAY_PRICE_WITH_TAX == true) {

       $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'];

     } else {

       $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'];

     }

   }

 }

?>

****** END ORIGINAL CODE ******

This is the replacement code for the GiftWrap Module...

******* REPLACEMENT CODE FOR GIFTWRAP ******

     if (DISPLAY_PRICE_WITH_TAX == true) {

       $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost'] + $this->info['giftwrap_cost'];

     } else {

       $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost'] + $this->info['giftwrap_cost'];

     }

   }

 }

?>

****** END REPLACEMENT CODE FOR GIFTWRAP ******

My guess is that your issue has something to do with this section of code.

 

If you continue to have issues, please let me know.

 

-R

Link to comment
Share on other sites

I thought so too but that wasn't the case. I have no ideas.

I checked the code 5 times in giftwrap and I have it just as it says. But it's still not adding the tax in the total.

 

It shows the correct tax that should be added but does not add it to the total. It DOES add the tax on the shipping charges, however.

Link to comment
Share on other sites

Here's an example:

 

Sub-Total: $5.00

USPS Table Rate (Ships in 7-10 business days): $2.00

(No Gift Wrap): $0.00

Ohio TAX 5.75%: $0.41

Total: $7.12

 

 

It adds the 12 cents tax for the shipping but is not adding the other 29 cents for the product tax

Link to comment
Share on other sites

grrr..wish we had an edit on here. Also Tax in Price is set to false. IF I change this to true, it will work with the modified giftwrap orders.php but I do not want the price with tax to show. It is confusing for the customer and looks as if the prices are higher.

Link to comment
Share on other sites

Hi,

 

Nice module. However I have seen the same tax based problem, but I don't mind so much as I have set tax to included for the UK. THe other problem is that it used the function selectRowEffect() which has a global variable "selected".

 

This is for the shipping module and so if you change the gift wrap option it will also change the shipping method - which obviously you don't want. I wrote another javascript service to get round this problem.

 

Just thought I'd mention for your next version.

 

 

meltus

 

---------------------

 

http://www.highbarn-consulting.com

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

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

Guest
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...