Guest Posted November 8, 2007 Posted November 8, 2007 Hello. I've noticed the following three errors when trying to install this contribution `Online Gift Card v1.0' - Step 6 : The file doesn't exist (admin/includes/boxes/categories.php) Step 7 The line of code doesn't exist (define('WARNING_FILE_UPLOADS_DISABLED', 'Warning: File uploads are disabled in the php.ini configuration file.'); Step 9 This line of code doesn't exist (</table></form>). I'd appreciate your help. Thanks. BTW : I'm using version 2.2 of oscommerce. Quote
Guest Posted November 10, 2007 Posted November 10, 2007 I spoke to the author of this contrib and here is what they say (I implemented these changes and the contrib is now working) : For step 6 the file is actually admin/includes/boxes/catalog.php Step 7 : this was a bug in older versions of OSC they left out some english global vars, just add the code it says to before the closing ?> Step 9: add that last part after the following code <tr> <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td> <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_PAYMENT . '</a>'; ?></td> <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td> <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td> </tr> </table></td> </tr> </table> Quote
merginc Posted November 11, 2007 Posted November 11, 2007 I installed this contrib today, on a relatively fresh install of osCommerce 2.2rc1 w/ little modification. I have the Authorize.net AIM module installed. Everything seems to be in place for the Gift Card contrib to work, including the field/table mods on the database, and all the files. Yet, when I add a gift card item in the catalog, and then try to buy it, it doesn't write a gift card back to the gift card table in the database. If I complete the transaction, and then go to Manage Online Gift Cards in admin, or go to my account to see what gift cards I have, nothing shows up. Any ideas? My checkout_confirmation.php file is below if it helps... Thanks in advance! <?php /* $Id: checkout_confirmation.php,v 1.139 2003/06/11 17:34:53 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); // if the customer is not logged on, redirect them to the login page if (!tep_session_is_registered('customer_id')) { $navigation->set_snapshot(array('mode' => 'SSL', 'page' => FILENAME_CHECKOUT_PAYMENT)); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } // if there is nothing in the customers cart, redirect them to the shopping cart page if ($cart->count_contents() < 1) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } // avoid hack attempts during the checkout procedure by checking the internal cartID if (isset($cart->cartID) && tep_session_is_registered('cartID')) { if ($cart->cartID != $cartID) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } } // if no shipping method has been selected, redirect the customer to the shipping method selection page if (!tep_session_is_registered('shipping')) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); } if (!tep_session_is_registered('payment')) tep_session_register('payment'); if (isset($HTTP_POST_VARS['payment'])) $payment = $HTTP_POST_VARS['payment']; if (!tep_session_is_registered('comments')) tep_session_register('comments'); if (tep_not_null($HTTP_POST_VARS['comments'])) { $comments = tep_db_prepare_input($HTTP_POST_VARS['comments']); } // load the selected payment module require(DIR_WS_CLASSES . 'payment.php'); $payment_modules = new payment($payment); require(DIR_WS_CLASSES . 'order.php'); $order = new order; $payment_modules->update_status(); if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL')); } if (is_array($payment_modules->modules)) { $payment_modules->pre_confirmation_check(); } // load the selected shipping module require(DIR_WS_CLASSES . 'shipping.php'); $shipping_modules = new shipping($shipping); require(DIR_WS_CLASSES . 'order_total.php'); $order_total_modules = new order_total; $order_total_modules->process(); // Stock Check $any_out_of_stock = false; if (STOCK_CHECK == 'true') { for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { if (tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty'])) { $any_out_of_stock = true; } } // Out of Stock if ( (STOCK_ALLOW_CHECKOUT != 'true') && ($any_out_of_stock == true) ) { tep_redirect(tep_href_link(FILENAME_SHOPPING_CART)); } } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_CONFIRMATION); $breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')); $breadcrumb->add(NAVBAR_TITLE_2); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td> <?php if (isset($$payment->form_action_url)) { $form_action_url = $$payment->form_action_url; } else { $form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL'); } echo tep_draw_form('checkout_confirmation', $form_action_url, 'post'); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_confirmation.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <?php if ($sendto != false) { ?> <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo '<b>' . HEADING_DELIVERY_ADDRESS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>'); ?></td> </tr> <?php if ($order->info['shipping_method']) { ?> <tr> <td class="main"><?php echo '<b>' . HEADING_SHIPPING_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <tr> <td class="main"><?php echo $order->info['shipping_method']; ?></td> </tr> <?php } ?> </table></td> <?php } ?> <td width="<?php echo (($sendto != false) ? '70%' : '100%'); ?>" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <?php if (sizeof($order->info['tax_groups']) > 1) { ?> <tr> <td class="main" colspan="2"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> <td class="smallText" align="right"><b><?php echo HEADING_TAX; ?></b></td> <td class="smallText" align="right"><b><?php echo HEADING_TOTAL; ?></b></td> </tr> <?php } else { ?> <tr> <td class="main" colspan="3"><?php echo '<b>' . HEADING_PRODUCTS . '</b> <a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <?php } for ($i=0, $n=sizeof($order->products); $i<$n; $i++) { echo ' <tr>' . "\n" . ' <td class="main" align="right" valign="top" width="30">' . $order->products[$i]['qty'] . ' x</td>' . "\n" . ' <td class="main" valign="top">' . $order->products[$i]['name']; if (STOCK_CHECK == 'true') { echo tep_check_stock($order->products[$i]['id'], $order->products[$i]['qty']); } if ( (isset($order->products[$i]['attributes'])) && (sizeof($order->products[$i]['attributes']) > 0) ) { for ($j=0, $n2=sizeof($order->products[$i]['attributes']); $j<$n2; $j++) { echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'] . '</i></small></nobr>'; } } echo '</td>' . "\n"; if (sizeof($order->info['tax_groups']) > 1) echo ' <td class="main" valign="top" align="right">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n"; echo ' <td class="main" align="right" valign="top">' . $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']) . '</td>' . "\n" . ' </tr>' . "\n"; } ?> </table></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><b><?php echo HEADING_BILLING_INFORMATION; ?></b></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td width="30%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo '<b>' . HEADING_BILLING_ADDRESS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <tr> <td class="main"><?php echo tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'); ?></td> </tr> <tr> <td class="main"><?php echo '<b>' . HEADING_PAYMENT_METHOD . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <tr> <td class="main"><?php echo $order->info['payment_method']; ?></td> </tr> </table></td> <td width="70%" valign="top" align="right"><table border="0" cellspacing="0" cellpadding="2"> <?php if (MODULE_ORDER_TOTAL_INSTALLED) { echo $order_total_modules->output(); } ?> </table></td> </tr> </table></td> </tr> <?php if (is_array($payment_modules->modules)) { if ($confirmation = $payment_modules->confirmation()) { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="main"><b><?php echo HEADING_PAYMENT_INFORMATION; ?></b></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td class="main" colspan="4"><?php echo $confirmation['title']; ?></td> </tr> <?php for ($i=0, $n=sizeof($confirmation['fields']); $i<$n; $i++) { ?> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo $confirmation['fields'][$i]['title']; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo $confirmation['fields'][$i]['field']; ?></td> </tr> <?php } ?> </table></td> </tr> </table></td> </tr> <?php } } ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php if (tep_not_null($order->info['comments'])) { ?> <tr> <td class="main"><?php echo '<b>' . HEADING_ORDER_COMMENTS . '</b> <a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '"><span class="orderEdit">(' . TEXT_EDIT . ')</span></a>'; ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><?php echo nl2br(tep_output_string_protected($order->info['comments'])) . tep_draw_hidden_field('comments', $order->info['comments']); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td align="right" class="main"> <?php if (is_array($payment_modules->modules)) { echo $payment_modules->process_button(); } echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER) . "\n"; ?> </td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%" align="right"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> </tr> </table></td> <td width="25%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td><?php echo tep_image(DIR_WS_IMAGES . 'checkout_bullet.gif'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> </tr> </table></td> <td width="25%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '100%', '1'); ?></td> <td width="50%"><?php echo tep_draw_separator('pixel_silver.gif', '1', '5'); ?></td> </tr> </table></td> </tr> <tr> <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_DELIVERY . '</a>'; ?></td> <td align="center" width="25%" class="checkoutBarFrom"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '" class="checkoutBarFrom">' . CHECKOUT_BAR_PAYMENT . '</a>'; ?></td> <td align="center" width="25%" class="checkoutBarCurrent"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></td> <td align="center" width="25%" class="checkoutBarTo"><?php echo CHECKOUT_BAR_FINISHED; ?></td> </tr> </table></td> </tr> </table></form></td> <!-- body_text_eof //--> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2"> <!-- right_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_right.php'); ?> <!-- right_navigation_eof //--> </table></td> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Quote
Guest Posted November 12, 2007 Posted November 12, 2007 Are you using this contribution: http://addons.oscommerce.com/info/5527 If so, I would also like to know once the "bugs" are out and I can comfortably install this contrib in my live site. Quote
kinkyropes Posted November 12, 2007 Posted November 12, 2007 Does anyone have a copy of this installed? Im still not clear on how it functions and would like to see it in action ...... Quote
grpetz Posted November 12, 2007 Posted November 12, 2007 Are you using this contribution:http://addons.oscommerce.com/info/5527 If so, I would also like to know once the "bugs" are out and I can comfortably install this contrib in my live site. I've installed it and it is working great with no php errors..etc.,. but..... when I used a coupon for the test run here is what happened... I used a $20.00 coupon... upon checkout it showed $0.00 balance because my order was for the amount of $16.50.... so i confirmed it and successfully checked out with it..... However..... when it sent the confirmation purchase email to me and when I check the status of the order in the account it shows the order total being $13.00 and not $0.00.... it is deducting the remaining amount on the gift card which is $3.50 and not deducting $16.50 to show in the account and email purchase confirmations.... I've emailed him to him know of this little scenario.... This is a great program and a super idea! To anyone who does any modifications to your store... I highly suggest using WinMerge as a tool to do this.... I use to have some install problems with contributions until I started using this... it really helps you to insert the new codes perfectly.....just a helpful suggestion... :) Have a blessed day! Gary Quote
grpetz Posted November 12, 2007 Posted November 12, 2007 Are you using this contribution:http://addons.oscommerce.com/info/5527 If so, I would also like to know once the "bugs" are out and I can comfortably install this contrib in my live site. I've installed it and it is working great with no php errors..etc.,. but..... when I used a coupon for the test run here is what happened... I used a $20.00 coupon... upon checkout it showed $0.00 balance because my order was for the amount of $16.50.... so i confirmed it and successfully checked out with it..... However..... when it sent the confirmation purchase email to me and when I check the status of the order in the account it shows the order total being $13.00 and not $0.00.... it is deducting the remaining amount on the gift card which is $3.50 and not deducting $16.50 to show in the account and email purchase confirmations.... I've emailed him to him know of this little scenario.... This is a great program and a super idea! To anyone who does any modifications to your store... I highly suggest using WinMerge as a tool to do this.... I use to have some install problems with contributions until I started using this... it really helps you to insert the new codes perfectly.....just a helpful suggestion... :) Have a blessed day! Gary Quote
grpetz Posted November 13, 2007 Posted November 13, 2007 Does anyone have a copy of this installed? Im still not clear on how it functions and would like to see it in action ...... I have it working live at our website. It is working perfect for us. Here is the site.... lilybandmusic.com You'll need to go to the L.O.V. Online Store to see it.... Blessings... Gary Quote
Guest Posted November 15, 2007 Posted November 15, 2007 Gary, Any update on your issues? I want to make sure this works 100% before I install on my live site. Thanks! Jonathan Quote
grpetz Posted November 16, 2007 Posted November 16, 2007 Gary, Any update on your issues? I want to make sure this works 100% before I install on my live site. Thanks! Jonathan Hi Jonathan. He fixed the order total problem with the update. I have it installed at our ministry site and it works great. There is one drawback at the moment. But the author is also fixing this as well....that drawback is... if you use a gift card to pay for a product and the balance is zero dollars after using the coupon, it will still take you to PayPal even if there is no payment owed... He said he is working on the design to bypass going to PayPal if that method was selected.... For now I'm probably going to make suggestions to our customers that they use Pay by Check or money orders when using the coupon... This is really a great contribution... I have NO problems with bugs or php code errors... I highly suggest using WinMerge as a tool to compare files and merge the new code into it. It really helps me to see the difference in the files and what needs to be merged..... you can visit our site if you would like to see it in live action... hope this helps you out.... blessings... www.lilybandmusic.com Gary Quote
kinkyropes Posted November 19, 2007 Posted November 19, 2007 Howdy, Im having a bit of a problem with the SQL. Apperently BINARY is not a recognized data type in whatever version of MySQL is running on my host. A copy/paste of the sql file with the contribution caused syntax errors. But I googled a bit and tried replacing ALTER TABLE `products` ADD `products_gift_card` BINARY NOT NULL DEFAULT '0'; with ALTER TABLE `products` ADD `products_gift_card` BINARY(1) NOT NULL DEFAULT '0'; and also `gift_cards_enabled` BINARY NOT NULL DEFAULT '0', with `gift_cards_enabled` BINARY(1) NOT NULL DEFAULT '0', Everything seemed to be working fine. However, now none of the parts of the code that check the binary flag are working correctly. Even if I check the 'this is a gift card' box while creating the item, it still treats the item as if it was not a gift card. I looked over the code, and everywhere I looked, the flag check uses 1 and 0. I would like to assume that if I simply changed the binary data type to an int that everything would work fine. However, my SQL is extremely rusty (and I already got it wrong once) so I would like conformation or suggestions on what I can do. Thanks in advance, Jack Quote
caryne444 Posted November 19, 2007 Posted November 19, 2007 I've just installed this contribution on a fresh install of oscommerce using the File Replace method but I'm getting this error when I click on Catalog to try to create the online gift card : Fatal error: Call to undefined function: tep_hide_session_id() in /home/afrikali/public_html/democontrib/admin/categories.php on line 767 Any suggestions on how to fix this would be appreciated! :o Quote
caryne444 Posted November 20, 2007 Posted November 20, 2007 Anyone...? I've just installed this contribution on a fresh install of oscommerce using the File Replace method but I'm getting this error when I click on Catalog to try to create the online gift card : Fatal error: Call to undefined function: tep_hide_session_id() in /home/afrikali/public_html/democontrib/admin/categories.php on line 767 Any suggestions on how to fix this would be appreciated! :o Quote
TopGolfer Posted November 25, 2007 Posted November 25, 2007 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? Quote
TopGolfer Posted November 25, 2007 Posted November 25, 2007 OK I found the problem so thought I would share. The following instructions for the includes/classes/order.php needs to be replaced in 2 places! Make sure you do it in both places and everything seems to work OK. 18. Edit includes/classes/order.php Replace the following code: $this->products[$index] = array('qty' => $products[$i]['quantity'], 'name' => $products[$i]['name'], 'model' => $products[$i]['model'], 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'price' => $products[$i]['price'], 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), 'weight' => $products[$i]['weight'], 'id' => $products[$i]['id']); With the following code: /* gift card modification */ $this->products[$index] = array('qty' => $products[$i]['quantity'], 'name' => $products[$i]['name'], 'model' => $products[$i]['model'], 'tax' => tep_get_tax_rate($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'tax_description' => tep_get_tax_description($products[$i]['tax_class_id'], $tax_address['entry_country_id'], $tax_address['entry_zone_id']), 'price' => $products[$i]['price'], 'gift_card' => $products[$i]['gift_card'], 'final_price' => $products[$i]['price'] + $cart->attributes_price($products[$i]['id']), 'weight' => $products[$i]['weight'], 'id' => $products[$i]['id']); /* end of gift card modification */ Quote
ident Posted November 26, 2007 Posted November 26, 2007 step 6: Edit admin/includes/boxes/categories.php Not able to find that file over here. I've got: - admin/categories.php - includes/boxes/categories.php but not a admin/includes/boxes/categories.php :blush: Quote
janetgot Posted November 26, 2007 Posted November 26, 2007 step 6: Edit admin/includes/boxes/categories.php Not able to find that file over here. I've got: - admin/categories.php - includes/boxes/categories.php but not a admin/includes/boxes/categories.php :blush: I'm trying to install this now and see where you mean... I think the file is admin/includes/boxes/catalog.php (per the instructions in the contribution of Nov 8). Janet Quote
Guest Posted November 27, 2007 Posted November 27, 2007 Howdy, Im having a bit of a problem with the SQL. Apperently BINARY is not a recognized data type in whatever version of MySQL is running on my host. A copy/paste of the sql file with the contribution caused syntax errors. But I googled a bit and tried replacing ALTER TABLE `products` ADD `products_gift_card` BINARY NOT NULL DEFAULT '0'; with ALTER TABLE `products` ADD `products_gift_card` BINARY(1) NOT NULL DEFAULT '0'; and also `gift_cards_enabled` BINARY NOT NULL DEFAULT '0', with `gift_cards_enabled` BINARY(1) NOT NULL DEFAULT '0', Im having this problem too. Anyone with suggestions on how to amend the sql document properly? Quote
Guest Posted November 27, 2007 Posted November 27, 2007 Im having this problem too. Anyone with suggestions on how to amend the sql document properly? I still have not found a solution for this. Any help would be appreciated :) Thanks Quote
Guest Posted November 29, 2007 Posted November 29, 2007 Help help help PLEASE! Is that enough begging? Quote
Guest Posted December 10, 2007 Posted December 10, 2007 Would like to get this working to take advantage of the season. Any help appreciated! Quote
peredur Posted December 11, 2007 Posted December 11, 2007 Hmmm. Just installed this. Everything seems fine — except credit card won't process. Instead I get a batch of errors complaining about the lack of a shipping address. (I'm using a multi-zone module...but hard to imagine why that would matter...?) Anyone else happen to run into this? Quote
travellikesound Posted January 20, 2008 Posted January 20, 2008 I just installed this and I've logged into my admin panel to finish setting it up and it is giving me this error: Parse error: syntax error, unexpected ')' in /home/punkbaby/public_html/shop/admin/includes/boxes/catalog.php on line 39 I have a previous add-on i installed for coupon codes that uses this same area of code, so I think they might be interfering with eachother. Here is what is looks like: '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES . '</a><br>' . '<a href="' . tep_href_link(FILENAME_MANUFACTURERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_MANUFACTURERS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_REVIEWS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_REVIEWS . '</a><br>' . '<a href="' . tep_href_link(FILENAME_SPECIALS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_SPECIALS . '</a><br>' . //kgt - discount coupons '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>'. '<a href="' . tep_href_link(FILENAME_DISCOUNT_COUPONS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_DISCOUNT_COUPONS . '</a>' ); /*************** /* gift card modificaiton */ '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a><br>' . '<a href="' . tep_href_link(FILENAME_GIFT_CARDS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_CATEGORIES_GIFT_CARDS . '</a>'); /* end of gift card modification */ ***************/ //end kgt - discount coupons Anyone have any suggestions as to how I can fix this without messing up my coupon code? Quote
travellikesound Posted January 20, 2008 Posted January 20, 2008 OK, scratch the above. I figured out the error in my code. Quote
travellikesound Posted January 20, 2008 Posted January 20, 2008 Ok, another question though: Now that I've got it working, how do I make so customers don't get charged shipping on a gift card? Right now I just have a flat rate of $8.95 for all orders, but since a gift card isn't shipped there's no need for additional shipping charges. Quote
Recommended Posts
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.