Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Online Gift Card v1.0 - I've noticed three errors when trying to install.


Guest

Recommended Posts

I have installed online gift card v1.0.

 

I double checked to make sure all necessary files have been uploaded and in correct folder. instructions state go to admin -> modules -> order total -> gift card module to make sure "display gift card discount" is true.

 

The Gift Card Module is not in the list.

 

So would appreciate any suggestions on this from any one out there.

 

thanks.

 

blr044

Link to comment
Share on other sites

I have installed online gift card v1.0.

 

I double checked to make sure all necessary files have been uploaded and in correct folder. instructions state go to admin -> modules -> order total -> gift card module to make sure "display gift card discount" is true.

 

The Gift Card Module is not in the list.

 

So would appreciate any suggestions on this from any one out there.

 

thanks.

 

blr044

 

 

problem solved. ot_giftcard.php php script was not all there.

Link to comment
Share on other sites

  • 3 months later...

I'm running into problems when customers are trying to redeem their gift cards. When in check out, even if the order total is less than the balance on the card it still requires them to enter credit card information, even though the order total is $0.00. What can I do to solve this issue?

Link to comment
Share on other sites

  • 5 weeks later...
I'm running into problems when customers are trying to redeem their gift cards. When in check out, even if the order total is less than the balance on the card it still requires them to enter credit card information, even though the order total is $0.00. What can I do to solve this issue?

 

I'm also running into a similar issue. I'm using paypal EC IPN and I'm getting an error when the order total is $0. Is there a way to bypass payment info when order are less than $0?

 

Otherwise, great contribution!!

Link to comment
Share on other sites

  • 1 month later...

I too am having problems, although different to all of the above ones.

 

I can buy a gift card, it shows up in admin and I can enable it etc.

 

The customer can enter the code OK too, however if they are purchasing less than the amount of the gift card, Firefox (3) throws up an error and it doesn't make it into checkout at all. It all works OK if the amount the customer is purchasing is over the amount of the gift card, but if it is equal or less than the value of the card, they can't get into checkout.

 

Any clues anyone?

 

My site is http://mdfmagic.com.au

 

Cheers.

 

Dwane.

Link to comment
Share on other sites

I too am having problems, although different to all of the above ones.

 

I can buy a gift card, it shows up in admin and I can enable it etc.

 

The customer can enter the code OK too, however if they are purchasing less than the amount of the gift card, Firefox (3) throws up an error and it doesn't make it into checkout at all. It all works OK if the amount the customer is purchasing is over the amount of the gift card, but if it is equal or less than the value of the card, they can't get into checkout.

 

Any clues anyone?

 

My site is http://mdfmagic.com.au

 

Cheers.

 

Dwane.

 

 

I have solved the problem - I deleted the contrib.

 

I found that if I added 2 gift vouchers into it, then it would only process 1 for some reason.

 

Pity because it looked so good.

 

Cheers.

 

Dwane.

Link to comment
Share on other sites

I have also installed the contribution and patches on my system and everything seems to work except when I buy a gift card nothing is written to the gift_card table.

 

I have looked at the php code in checkout_process.php where it looks like the insert into the gift_card table occurs and can't see the problem.

 

I manually added a gift card record and it shows up in My Account correctly.

 

Here is the code:

 

	/* gift card modification */
if ($order->products[$i]['gift_card'] == '1') {
	$gift_code = generate_gift_card_code();
	$sql_data_array = array('gift_cards_amount' => $order->products[$i]['final_price'],
							'gift_cards_amount_remaining' => $order->products[$i]['final_price'],
							'gift_cards_code' => $gift_code,
							'orders_products_id' => $order_products_id,
							'purchaser' => $customer_id,
							'gift_cards_enabled' => 1);
	tep_db_perform(TABLE_GIFT_CARDS, $sql_data_array);
}
if (tep_session_is_registered('gift_card')) {
  unset($_SESSION['gift_card']);
}
/* end of gift card modificaiton */

 

 

The only thing I can think is that this line:

 

if ($order->products[$i]['gift_card'] == '1')

 

isn't coming up true so the insert isn't working.

 

Any ideas or help in debugging this?

 

 

I had this same problem and was pulling my hair out trying to debug it. In catalog/checkout_confirmation.php I fixed it by copying and pasting everything between

 

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 

DOWN TO

 

 $sql_data_array = array('customers_id' => $customer_id,

 

from the supplied file into my version of checkout_process.php

 

ALSO for those of you using PayPal with this module...

I also had to make some adjustments to the catalog/includes/modules/payment/paypal.php to handle transactions properly. I just cut down the order info sent to paypal about shipping cost to make the totals show correctly.

 

 #---------------------------------
# FIX TO HANDLE GIFT CARDS
#---------------------------------
#tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .
#tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('amount', number_format(($order->info['total']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

#---------------------------------
# End gift card fix
#---------------------------------

 

YOU'LL HAVE TO REMOVE THE LINE WRAPPING IN THE ABOVE CODE

 

and also in the catalog/includes/modules/payment/paypal.php file I replaced this

return $process_button_string;

 

with this

 

return str_replace("-","",$process_button_string);

Link to comment
Share on other sites

  • 9 months later...

Well, I've given this module a try, and generally speaking it is working well, except.........!

 

After creating an (example) $10 GC, then applying the code on the checkout_confirmation page, the order total shows the correct Gift Card Discount (ie: -$10.00), but the Total seems to reflect an "additional $10 off!

 

Example:

 

Subtotal: $30.00

Gift Card: -$10.00

Total: $10.00

 

 

Only happening like this when a gift card is used!

 

Any Ideas??????

Link to comment
Share on other sites

  • 3 weeks later...

Is there Anyone who is using this module? It seems good, but I'm just getting the "double value"! :blink:

 

It would seem that there is "double-code", or the wrong calculation somewhere, but I can't find it for the life-of-me!!

 

Anyone have ANY ideas? :wacko:

 

 

Well, I've given this module a try, and generally speaking it is working well, except.........!

 

After creating an (example) $10 GC, then applying the code on the checkout_confirmation page, the order total shows the correct Gift Card Discount (ie: -$10.00), but the Total seems to reflect an "additional $10 off!

 

Example:

 

Subtotal: $30.00

Gift Card: -$10.00

Total: $10.00

 

 

Only happening like this when a gift card is used!

 

Any Ideas??????

Link to comment
Share on other sites

  • 1 month later...

I have installed this contribution following all of the steps. When I login to my OS Commerce admin site, I go to Modules -> Order Total -> Gift Card -> Install. When I push the install button, nothing happens. The install button remains. Anyone had this issue before and if so was there a solution?

 

Thanks,

Jonaton

Link to comment
Share on other sites

  • 4 months later...

Still not able to get anything written to the gift cards table, too bad. Has anyone had any success with troubleshooting this issue?

 

Regards,

Jonathon

 

I had this same problem and was pulling my hair out trying to debug it. In catalog/checkout_confirmation.php I fixed it by copying and pasting everything between

 

 require(DIR_WS_CLASSES . 'order_total.php');
 $order_total_modules = new order_total;

 

DOWN TO

 

 $sql_data_array = array('customers_id' => $customer_id,

 

from the supplied file into my version of checkout_process.php

 

ALSO for those of you using PayPal with this module...

I also had to make some adjustments to the catalog/includes/modules/payment/paypal.php to handle transactions properly. I just cut down the order info sent to paypal about shipping cost to make the totals show correctly.

 

 #---------------------------------
# FIX TO HANDLE GIFT CARDS
#---------------------------------
#tep_draw_hidden_field('amount', number_format(($order->info['total'] - $order->info['shipping_cost']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .
#tep_draw_hidden_field('shipping', number_format($order->info['shipping_cost'] * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

tep_draw_hidden_field('amount', number_format(($order->info['total']) * $currencies->get_value($my_currency), $currencies->get_decimal_places($my_currency))) .

#---------------------------------
# End gift card fix
#---------------------------------

 

YOU'LL HAVE TO REMOVE THE LINE WRAPPING IN THE ABOVE CODE

 

and also in the catalog/includes/modules/payment/paypal.php file I replaced this

return $process_button_string;

 

with this

 

return str_replace("-","",$process_button_string);

Link to comment
Share on other sites

  • 10 months later...

I'm having trouble -- I have online gift card working BUT it only works when the gift card is more then the total.

If the total is more then the gift card - it disables the gift card and does not deduct the gift card amount from the total

Link to comment
Share on other sites

  • 11 months later...

Elliott,

 

I tried to use this add on a while back, but gave up and created a new add on called Virtual Pin. Look at my profile page for more information.

 

 

 

Chris

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.

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