Guest Posted October 16, 2005 Share Posted October 16, 2005 Hi- I'm not sure how to blend this code together- any expert help greatly appreciated! 1. CCGV Code to be modified: -------------------------------------------------------------- // CCGV Start - Addition if (tep_session_is_registered('customer_id')) { $gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . $customer_id . "'"); $gv_result = tep_db_fetch_array($gv_query); if ($gv_result['amount'] > 0 ) { $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator()); $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_BALANCE . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($gv_result['amount']) . '</td></tr></table>'); $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext"><a href="'. tep_href_link(FILENAME_GV_SEND) . '">' . BOX_SEND_TO_FRIEND . '</a></td></tr></table>'); } } if (tep_session_is_registered('gv_id')) { $gv_query = tep_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'"); $coupon = tep_db_fetch_array($gv_query); $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator()); $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . VOUCHER_REDEEMED . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($coupon['coupon_amount']) . '</td></tr></table>'); } if (tep_session_is_registered('cc_id') && $cc_id) { $info_box_contents[] = array('align' => 'left','text' => tep_draw_separator()); $info_box_contents[] = array('align' => 'left','text' => '<table cellpadding="0" width="100%" cellspacing="0" border="0"><tr><td class="smalltext">' . CART_COUPON . '</td><td class="smalltext" align="right" valign="bottom">' . '<a href="javascript:couponpopupWindow(\'' . tep_href_link(FILENAME_POPUP_COUPON_HELP, 'cID=' . $cc_id) . '\')">' . CART_COUPON_INFO . '</a>' . '</td></tr></table>'); } // CCGV End - Addition ---------------------------------------------------------------------------- Here's the new code for the gift registry: if($cart->registry_id > 0){ $display_registry_owners = tep_get_registry_owners($cart->registry_id); $info_box_contents[] = array('text' => tep_draw_separator()); $info_box_contents[] = array('text' => tep_draw_separator()); $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_DISPLAY_REGISTRY_PRODUCTS, 'registry_id=' . $cart->registry_id, 'NONSSL') . '">' . sprintf(BOX_SHOPPING_CART_FOR_WHO, $display_registry_owners['customers_firstname'], $display_registry_owners['customers_lastname'], $display_registry_owners['co_registrant_first_name'], $display_registry_owners['co_registrant_last_name'], $cart->registry_id) . '</a>'); // $info_box_contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_DISPLAY_REGISTRY_PRODUCTS, 'registry_id=' . $cart->registry_id, 'NONSSL') . '">' . 'You\'re about to purchase goods for ' . $display_registry_owners['customers_firstname'] . ' ' . $display_registry_owners['customers_lastname'] . ' & ' . $display_registry_owners['co_registrant_first_name'] . ' ' . $display_registry_owners['co_registrant_last_name'] . ' (Registry# ' . $cart->registry_id . ')</a>'); } THANKS! Quote Link to comment Share on other sites More sharing options...
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.