Jump to content
Sign in to follow this  
brochure

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

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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!!

Share this post


Link to post
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.

Share this post


Link to post
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.

Share this post


Link to post
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);

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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);

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Having same problem as TopGolfer, everything seems to work except when I buy a gift card nothing is written to the gift_card table. Tried his fix but still not working. Anyone have this problem, know a solution?!

Share this post


Link to post
Share on other sites

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


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

 

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×