Jump to content


Corporate Sponsors


Latest News: (loading..)

- - - - -

Gift Cards Online -- Calculating gift card into total

gift card calculate total

2 replies to this topic

#1 creters

  • Community Member
  • 4 posts
  • Real Name:Norm

Posted 07 January 2012, 19:04

Installed the gift cards online contribution to my site (running v. 2.2 RC2) but having trouble getting the gift card to calculate during checkout the way I would like. Currently, total purchase price, shipping and tax are totaled and then the gift card is deducted from that total. (i.e. 19.50 product + 8.50 shipping + 1.40 tax -25.00 gift card = 4.50 due with order). I would rather have it deduct the gift card immediately after the product costs (i.e. 19.50 product - 25.00 gift card +8.50 shipping +1.40 tax = 9.90 due with order and a balance left of 6.50 on the gift card).

I have read other topics on this forum and tried some of the suggestions: changing the sort order, putting the order process line before the add-on module in checkout_process.php, etc. Sort order changes the appearance on the checkout, but does not change the calculation. Putting the order process line prior to any add on module (also have a discount code module on the site) doesn't do anything as well.

Also read about the CCGV module, but have so many modifications already, I would have to manually modify the site and looks like that would take days.

Discount codes do the same thing as far as calcuations by the way (i.e. discount of 10% not only takes 10% off the product price, but 10% off the shipping and tax as well).

Am "versed" enough with the program to go in and move/modify/change lines, but not sure where the changes need to be (if this is a do-able thing). Any help or getting pointed in the right direction would be greatly appreciated.

#2 DunWeb

  • Community Sponsor
  • 10,466 posts
  • Real Name:Chris Dunn
  • Gender:Male
  • Location:Tecumseh, Ontario, Canada N8N 1X8

Posted 07 January 2012, 19:25

Norm,

I believe your gift card add on is functioning as it should.

The value of the gift card is deducted from the purchase total. If the purchase total is greater than the value of the card, then a balance is due, if it is less than the value of the gift card, then there is a balance remaining on the gift card.

You cannot deduct the value of the gift card before the taxes and shipping as the gift card value is the same as cash.

Your analogy with the discount coupon code is non-comparible as the discount value is just like putting the item on sale, reducing the retail price of the item. At which time the taxes and shipping are then added to the sub-total (discounted retail price).



Chris
:|: Was this post helpful ? Click the LIKE THIS button :|:

:|: Click Here to learn how I can help you with custom coding, add ons, security and templates :|:

:|: Need an Area Calculator, Pre-Paid Account, Virtual Pin, Auction or Layaway Add on ? Click Here :|:

#3 creters

  • Community Member
  • 4 posts
  • Real Name:Norm

Posted 09 January 2012, 16:34

Okay, understand the concept of a gift card being the same as cash and can be applied to product total as well as shipping. However, on further testing, have a bit of a different problem occurring with the totals now: as long as someone only applies a partial amount of the gift card everything works fine. If someone puts through an order that requires the entire amount of the gift card (brings the gift card balance down to 0) the checkout page on the site calculates and shows resulting total correctly, but in the resulting emails and the admin lookup for orders, the line by line itemization shows subtotal, shipping and total but no line item deducting the gift card amount (as if the card was never used). Oddly enough, in the Admin Online Gift Card Module it does correctly show the particular code now has a zero balance.

Any ideas?

Not as important as problem above, but was also wondering if there were some way to track the actual code which was used on each order. (i.e. if someone buys a handful of gift cards it will show that an amount was applied, but does not show which of the cards was used unless I go into the Admin panel and manually look for any changes in balance remaining column.).

Any assistance is greatly appreciated; thanks in advance.