Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Gift Cards Online -- Calculating gift card into total


Guest

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 1 year later...

The method of calculation by the gift card site is a common approach adopted by a majority of online retailers and gift card sites. So, all you need to check is the final figures tally, when you do a manual calculation. The method of calculation by the gift card site is a common approach adopted by a majority of online retailers and gift card sites. So, all you need to check is the final figures tally, when you do a manual calculation.

Link to comment
Share on other sites

  • 3 months later...

So I just installed this to my site and it is giving me some issues. I can see it in the admin panel however I cannot edit/manipulate it in the admin panel. I can create one in the database manualy from the phpmyadmin but I still then cannot do anything but disable it or enable it. There is no option to create one in the admin panel. Can someone suggest to me what I did wrong?

Link to comment
Share on other sites

In the update for 2.3.3.4 it appears that if you are not upgrading from the prior version that a bit of code was left out. I could have missed it but just in case here it is.

 

<!-- gift card modification //-->

<tr>

<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td class="main"><?php echo TEXT_PRODUCTS_GIFT_CARD; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . tep_draw_checkbox_field('gift_card', '1', ($pInfo->products_gift_card == '1') ? true : false) . TEXT_PRODUCTS_GIFT_CARD_INFORMATION; ?></td>

</tr>

<!-- end of gift card modification //-->

 

This little piece of code kept me from being able to even add gift card as an option in the admin panel. It tells you where to put it in 'admin/categories' if you go to the previous 2.1 version.

 

Hope this helps others as it certainly prevented me from having to remove it after the entire install was done completely.

Edited by msrising
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.
Note: Your post will require moderator approval before it will be visible.

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