Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

sharplab

Archived
  • Posts

    180
  • Joined

  • Last visited

Everything posted by sharplab

  1. Heres what we have; :-) <?php /* Copyright © 2007 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* **GOOGLE CHECKOUT ** v1.4.5 * @version $Id: gcheckout.php 5499 2007-09-27 14:58:57Z ropu $ * Script invoked when Google Checkout payment option has been enabled * It uses phpGCheckout library so it can work with PHP4 and PHP5 * Generates the cart xml, shipping and tax options and adds them as hidden fields * along with the Checkout button * A disabled button is displayed in the following cases: * 1. If merchant id or merchant key is not set * 2. If there are multiple shipping options selected and they use different shipping tax tables * or some dont use tax tables */ //error_reporting(E_ALL); //require_once('admin/includes/configure.php'); //require_once('includes/configure.php'); require_once('includes/languages/'. $language .'/modules/payment/googlecheckout.php'); require_once('includes/modules/payment/googlecheckout.php'); // Function which returns the current URL. function gc_selfURL() { $s = empty($_SERVER['HTTPS']) ? '' : ($_SERVER['HTTPS'] == 'on') ? 's' : ''; $protocol = gc_strleft(strtolower($_SERVER['SERVER_PROTOCOL']), '/') . $s; $port = ($_SERVER['SERVER_PORT'] == '80') ? '' : (':'. $_SERVER['SERVER_PORT']); return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $_SERVER['REQUEST_URI']; } Thx!
  2. Thx Rachael! We burnin' the midnight oil again tonight. ;-)
  3. Hi Rachael! Thanks for offering some assistance! One quick thing how can the path say "googlecheckout/includes"? We have the googlechecout directory in out store root directory (same directory as includes). Do I have the googlechecout in the wrong directory? Should i put in in the domain root directory and not the store root? We just finished proof reading our config file from shop/includes (not shop/admin/includes) and we do not see any double //. The file is below. As far as I remember we never changed the config file when we installed the GC contrib. We have never encountered any similar problems with syntax errors before this. Would this path be defined in any of the contrib install files or edits? <?php // Please, note that all changes in this file will be lost // after reconfiguring application by Plesk define('HTTP_SERVER', 'http://www.sharpweblabs.com'); define('HTTPS_SERVER', 'https://www.sharpweblabs.com'); define('ENABLE_SSL', 'true'); define('HTTP_COOKIE_DOMAIN', '.sharpweblabs.com'); define('HTTPS_COOKIE_DOMAIN', '.sharpweblabs.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/shop/'); define('DIR_WS_HTTPS_CATALOG', '/shop/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']).'/'); // define('DIR_FS_CATALOG', '/home/sharpweb/public_html/shop/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', '*****); define('DB_SERVER_PASSWORD', '*****'); define('DB_DATABASE', '*****'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> Also we do have the includes/languages/english/modules/payment/ googlechecout.php file installed. It is pasted below. Maybe you see something we do not. (crosses fingers). Thanks again for help! <?php /* Copyright © 2007 Google Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ /* **GOOGLE CHECKOUT ** v1.4.5 @version $Id: googlecheckout.php 5624 2007-08-24 14:58:57Z ropu $ */ //** GOOGLE CHECKOUT ** define('MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_TITLE', 'GoogleCheckout'); define('MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_DESCRIPTION', 'GoogleCheckout'); define('MODULE_PAYMENT_GOOGLECHECKOUT_TEXT_OPTION', '- Or use -'); define('GOOGLECHECKOUT_STRING_WARN_USING_SANDBOX', 'GC is set to use SANDBOX. Order will be processed but NOT charged.'); define('GOOGLECHECKOUT_STRING_WARN_NO_MERCHANT_ID_KEY', 'Google Checkout Merchant Id or Key has not been setted up'); define('GOOGLECHECKOUT_STRING_WARN_VIRTUAL', 'Some download products in your cart are currently not available via Google Checkout.'); define('GOOGLECHECKOUT_STRING_WARN_EMPTY_CART', 'The Cart is empty'); define('GOOGLECHECKOUT_STRING_WARN_OUT_OF_STOCK', 'Some products are Out of Stock'); define('GOOGLECHECKOUT_STRING_WARN_MULTIPLE_SHIP_TAX', 'There are multiple shipping options selected and they use different shipping tax tables or some dont use tax tables'); define('GOOGLECHECKOUT_STRING_WARN_MIX_VERSIONS', 'The Version of the installed module in the Admin UI is %s and the one of the package is %s, Remove/Reinstall the module'); define('GOOGLECHECKOUT_STRING_WARN_WRONG_SHIPPING_CONFIG', 'DIR_FS_CATALOG and DIR_WS_MODULES may be wrong configured in includes/configure.php file. This dir doens\'t exists: %s'); define('GOOGLECHECKOUT_STRING_WARN_RESTRICTED_CATEGORY', 'Some items are in GC restricted category.'); // This string will be added after the product name and description in the yellow box in the GC confirmation page for all Digital Goods. define('GOOGLECHECKOUT_STRING_EXTRA_DIGITAL_CONTENT', 'Allow 2-5 minutes to get all the transaction processed.'); define('GOOGLECHECKOUT_STRING_ERR_SHIPPING_CONFIG', ' Error: Shipping Methods not configured '); define ('GOOGLECHECKOUT_FLAT_RATE_SHIPPING', 'Flat Rate Per Order'); define ('GOOGLECHECKOUT_ITEM_RATE_SHIPPING', 'Flat Rate Per Item'); define ('GOOGLECHECKOUT_TABLE_RATE_SHIPPING', 'Vary by Weight/Price'); define ('GOOGLECHECKOUT_TABLE_NO_MERCHANT_CALCULATION', 'No merchant calculation shipping selected'); define ('GOOGLECHECKOUT_MERCHANT_CALCULATION_NOT_CONFIGURED', ' not configured!<br />'); define ('GOOGLECHECKOUT_ERR_REGULAR_CHECKOUT', 'Google Checkout Can not be used in regular checkout, click in the Google Checkout Button Below'); define ('GOOGLECHECKOUT_ERR_DUPLICATED_ORDER', 'Duplicated NewOrderNotification #%s Cart order #%s'); // Google Request Success messages define('GOOGLECHECKOUT_SUCCESS_SEND_CHARGE_ORDER', 'Sent Google Charge Order Command'); define('GOOGLECHECKOUT_SUCCESS_SEND_PROCESS_ORDER', 'Sent Google Process Order Command'); define('GOOGLECHECKOUT_SUCCESS_SEND_DELIVER_ORDER', 'Sent Google Deliver Order Command'); define('GOOGLECHECKOUT_SUCCESS_SEND_ARCHIVE_ORDER', 'Sent Google Archive Order Command'); define('GOOGLECHECKOUT_SUCCESS_SEND_REFUND_ORDER', 'Sent Google Full Refund Order Command'); define('GOOGLECHECKOUT_SUCCESS_SEND_CANCEL_ORDER', 'Sent Google Cancel Order Command'); define('GOOGLECHECKOUT_SUCCESS_SEND_MESSAGE_ORDER', 'Sent Google Message to the Buyer'); define('GOOGLECHECKOUT_SUCCESS_SEND_NEW_USER_CREDENTIALS', 'Sent New Buyer Credentials to the Buyer'); define('GOOGLECHECKOUT_SUCCESS_SEND_MERCHANT_ORDER_NUMBER', 'Sent Merchant Order Number'); define('GOOGLECHECKOUT_SUCCESS_SEND_ADMIN_COPY_EMAIL', 'Sent Status Change Message to Admin email'); // Google Request warning Messages define('GOOGLECHECKOUT_WARNING_CHUNK_MESSAGE', 'Google Message was longer than %s, it was chunked when sent to the buyer.'); define('GOOGLECHECKOUT_WARNING_SYSTEM_EMAIL_SENT', 'A regular email was sent to the buyer with the full message'); // Google Request Error Messages define('GOOGLECHECKOUT_ERR_SEND_CHARGE_ORDER', 'Error sending Google Charge Order, see error logs'); define('GOOGLECHECKOUT_ERR_SEND_PROCESS_ORDER', 'Error sending Google Process Order, see error logs'); define('GOOGLECHECKOUT_ERR_SEND_DELIVER_ORDER', 'Error sending Google Deliver Order, see error logs'); define('GOOGLECHECKOUT_ERR_SEND_ARCHIVE_ORDER', 'Error sending Google Archive Order, see error logs'); define('GOOGLECHECKOUT_ERR_SEND_REFUND_ORDER', 'Error sending Google Refund Order, see error logs'); define('GOOGLECHECKOUT_ERR_SEND_CANCEL_ORDER', 'Error sending Google Cancel Order, see error logs'); define('GOOGLECHECKOUT_ERR_SEND_MESSAGE_ORDER', 'Error sending Google Message, see error logs'); define('GOOGLECHECKOUT_ERR_SEND_NEW_USER_CREDENTIALS', 'Error sending New Buyer Credentials, see error logs'); define('GOOGLECHECKOUT_ERR_SEND_MERCHANT_ORDER_NUMBER', 'Error sending Merchant Order Number, see error logs'); define('GOOGLECHECKOUT_ERR_INVALID_STATE_TRANSITION', 'Invalid Google Checkout State transition: %s => %s, revert to %s and try again. See README'); // Remember max chars in 255, included that store name, email and pass that will replace the %s define('GOOGLECHECKOUT_NEW_CREDENTIALS_MESSAGE', 'These are your Credentials to log into %s site. User: %s Pass: %s Please change your password after logging in - Change it in "MyAccount" area.'); // Coupons define('GOOGLECHECKOUT_COUPON_ERR_ONE_COUPON', 'Sorry, only one coupon per order'); define('GOOGLECHECKOUT_COUPON_ERR_MIN_PURCHASE', 'Sorry, the minimum purchase hasn\'t been reached to use this coupon'); define('GOOGLECHECKOUT_COUPON_DISCOUNT', 'Discount Coupon: '); define('GOOGLECHECKOUT_COUPON_FREESHIP', 'Free Shipping Coupon: '); // New Orders define('GOOGLECHECKOUT_STATE_NEW_ORDER_NUM', 'Google Checkout Order No: '); define('GOOGLECHECKOUT_STATE_NEW_ORDER_MC_USED', 'Merchant Calculations used: '); define('GOOGLECHECKOUT_STATE_NEW_ORDER_BUYER_USER', 'NEW Buyer\'s User: '); define('GOOGLECHECKOUT_STATE_NEW_ORDER_BUYER_PASS', 'Buyer\'s Password: '); // States define('GOOGLECHECKOUT_STATE_STRING_TIME', 'Time: '); define('GOOGLECHECKOUT_STATE_STRING_NEW_STATE', 'New State: '); define('GOOGLECHECKOUT_STATE_STRING_ORDER_READY_CHARGE', 'Order ready to be charged!'); define('GOOGLECHECKOUT_STATE_STRING_PAYMENT_DECLINED', 'Payment was declined!'); define('GOOGLECHECKOUT_STATE_STRING_ORDER_CANCELED', 'Order was canceled.'); define('GOOGLECHECKOUT_STATE_STRING_ORDER_CANCELED_REASON', 'Reason: '); define('GOOGLECHECKOUT_STATE_STRING_ORDER_CANCELED_BY_GOOG', 'Order was canceled by Google.'); define('GOOGLECHECKOUT_STATE_STRING_ORDER_DELIVERED', 'Order was Shipped.'); define('GOOGLECHECKOUT_STATE_STRING_TRACKING', 'Shipping Tracking Data: '); define('GOOGLECHECKOUT_STATE_STRING_TRACKING_CARRIER', 'Carrier: '); define('GOOGLECHECKOUT_STATE_STRING_TRACKING_NUMBER', 'Tracking Number: '); define('GOOGLECHECKOUT_STATE_STRING_LATEST_CHARGE', 'Latest charge amount: '); define('GOOGLECHECKOUT_STATE_STRING_TOTAL_CHARGE', 'Total charge amount: '); define('GOOGLECHECKOUT_STATE_STRING_LATEST_REFUND', 'Latest refund amount: '); define('GOOGLECHECKOUT_STATE_STRING_TOTAL_REFUND', 'Total Order refund amount: '); define('GOOGLECHECKOUT_STATE_STRING_GOOGLE_REFUND', 'Google Refund: '); define('GOOGLECHECKOUT_STATE_STRING_NET_REVENUE', 'Net revenue: '); define('GOOGLECHECKOUT_STATE_STRING_RISK_INFO', 'Risk Information: '); define('GOOGLECHECKOUT_STATE_STRING_RISK_ELEGIBLE', ' Elegible for Protection: '); define('GOOGLECHECKOUT_STATE_STRING_RISK_AVS', ' Avs Response: '); define('GOOGLECHECKOUT_STATE_STRING_RISK_CVN', ' Cvn Response: '); define('GOOGLECHECKOUT_STATE_STRING_RISK_CC_NUM', ' Partial CC number: '); define('GOOGLECHECKOUT_STATE_STRING_RISK_ACC_AGE', ' Buyer account age: '); // Custom GC order states names define('GOOGLECHECKOUT_CUSTOM_ORDER_STATE_NEW', 'Google New'); define('GOOGLECHECKOUT_CUSTOM_ORDER_STATE_PROCESSING', 'Google Processing'); define('GOOGLECHECKOUT_CUSTOM_ORDER_STATE_SHIPPED', 'Google Shipped'); define('GOOGLECHECKOUT_CUSTOM_ORDER_STATE_REFUNDED', 'Google Refunded'); define('GOOGLECHECKOUT_CUSTOM_ORDER_STATE_SHIPPED_REFUNDED', 'Google Shipped and Refunded'); define('GOOGLECHECKOUT_CUSTOM_ORDER_STATE_CANCELED', 'Google Canceled'); // ** END GOOGLE CHECKOUT ** ?>
  4. Hoping for some guidance as my head spins round and round! We installed the GC contrib and get this error from responsehandler: Warning: googlecheckout(/home/sharpweb/public_html/shop/googlecheckout//includes/languages/english/modules/payment/googlecheckout.php) [function.googlecheckout]: failed to open stream: No such file or directory in /home/sharpweb/public_html/shop/includes/modules/payment/googlecheckout.php on line 43 Fatal error: googlecheckout() [function.require]: Failed opening required '/home/sharpweb/public_html/shop/googlecheckout//includes/languages/english/modules/payment/googlecheckout.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:.:.') in /home/sharpweb/public_html/shop/includes/modules/payment/googlecheckout.php on line 43 We have double checked all work. Hope someone can help :-) THx! Jasmine
  5. I am having a smiliar problem with Google Checkout. I installed it as instructed and double checked install. When I run the "ResponseHandler.php" I get these 2 errors: Warning: googlecheckout(/home/sharpweb/public_html/shop/googlecheckout//includes/languages/english/modules/payment/googlecheckout.php) [function.googlecheckout]: failed to open stream: No such file or directory in /home/sharpweb/public_html/shop/includes/modules/payment/googlecheckout.php on line 43 Fatal error: googlecheckout() [function.require]: Failed opening required '/home/sharpweb/public_html/shop/googlecheckout//includes/languages/english/modules/payment/googlecheckout.php' (include_path='.:/usr/lib/php:/usr/local/lib/php:.:.') in /home/sharpweb/public_html/shop/includes/modules/payment/googlecheckout.php on line 43 Any IDEAS??? Thanks so much! Steve
  6. Thanks "PP" YOU ARE A HUGE HELP! We have SSL being set up now! I will wait until the SSL back end is set up. Then I will cross my fingers that that fixes it! THX AGAIN! :-) Steve
  7. Can anyone advise me on this? THX! Steve
  8. Thanks ! Here is my code for the return string: $process_button_string = tep_draw_hidden_field('cmd', '_xclick') . tep_draw_hidden_field('business', MODULE_PAYMENT_PAYPAL_ID) . tep_draw_hidden_field('item_name', STORE_NAME) . 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('currency_code', $my_currency) . tep_draw_hidden_field('return', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . tep_draw_hidden_field('rm', 2) . tep_draw_hidden_field('cancel_return', tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL')); Also I DO NOT have SSL enabled yet, could that be the problem? One other thing: FILENAME_CHECKOUT_PROCESS is set to "checkout_process.php" IN THE: includes/filenames.php SHOULD I HAVE THE FULL PATH HERE? Example = http://www.mystore.com/catalog/checkout_process.php ?? THX! Steve
  9. Just tried that but still get this when I hit the "Complete This Transaction Button". THE BUTTON ACTUALLY SAYS: "Complete Your Order Confirmation" This is the button on the bottom of the page lower right that I see after I make the PayPal payment.
  10. Just tried that but still get this when I hit the "Complete This Transaction Button". This is the button I see after I make a payment. I am using the liver site also not the test sandbox. Here is what I get in the browser: http://checkout_process.php/ and I have the full path entered in the PayPal site. What to do? Thx so much for the help! Steve
  11. After weeks of trying to fix this problem and searching forum thread after thread I may have it. When someone pays by PayPal and they try to return to merchant by clicking the button it goes to a shortened up url. I have the return url in PayPal set to: www.mydomain.com/mystore/checkout_success.php WHAT I GET IS THIS THOUGH: http://checkout_success.php/? I READ THAT THE FIX IS THE "RM" VALUE. IT MUST BE SET TO 2 Okay so I was told to insert this: tep_draw_hidden_field('rm', 2) IN THE paypal.php page. QUESTION is.. WHERE IN THE WORLD DO I PUT IT? DO I REMOVE SOMETHING? PUT IT ANYWHERE? PLEASE PLEASE HELP! THX! Steve
  12. NOW I GET THESE ERRORS AT THE BOTTOM OF THE STORE: <br /> <b>Warning</b>: fopen(/home/sharpweb/public_html/shop/cache/_shop_index.php__english_USD.cache): failed to open stream: No such file or directory in <b>/home/sharpweb/public_html/shop/includes/classes/page_cache.php</b> on line <b>272</b><br /> <br /> <b>Warning</b>: fwrite(): supplied argument is not a valid stream resource in <b>/home/sharpweb/public_html/shop/includes/classes/page_cache.php</b> on line <b>273</b><br /> <br /> <b>Warning</b>: fclose(): supplied argument is not a valid stream resource in <b>/home/sharpweb/public_html/shop/includes/classes/page_cache.php</b> on line <b>274</b><br />
  13. Tryin to install the page cache contrib. On This Step It Says: STEP 6 - Edit includes/functions/html_output.php Find this code in tep_href_link(): global $request_type, $session_started; And REPLACE it with this code: global $request_type, $session_started, $SID; ------------------------------------------------------ THEN SAYS THIS: Find this code in tep_href_link(): if (isset($_sid)) { $link .= $separator . $_sid; } And REPLACE it with this code: if (!tep_session_is_registered('customer_id') && ENABLE_PAGE_CACHE == 'true' && class_exists('page_cache')) { $link .= $separator . '<osCsid>'; } elseif (isset($_sid)) { $link .= $separator . $_sid; } --------------------------------------------------- I HAVE LISTED THE CODE FROM THE HTML_OUTPUT PAGE BELOW I CAN NOT FIND ANY OF THIS Does this simply mean that I have a different version and can skip this step or I am TROUBLE??? THX ALL! ---------------------------------------------------- PAGE = includes/functions/html_output.php <?php /* $Id: html_output.php,v 1.56 2003/07/09 01:15:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ //// // Ultimate SEO URLs v2.1 // The HTML href link wrapper function function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { global $seo_urls; if ( !is_object($seo_urls) ){ if ( !class_exists('SEO_URL') ){ include_once(DIR_WS_CLASSES . 'seo.class.php'); } global $languages_id; $seo_urls = new SEO_URL($languages_id); } return $seo_urls->href_link($page, $parameters, $connection, $add_session_id); } //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } // alt is added to the img tag even if it is null to prevent browsers from outputting // the image filename as default $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) { if ($image_size = @getimagesize($src)) { if (empty($width) && tep_not_null($height)) { $ratio = $height / $image_size[1]; $width = $image_size[0] * $ratio; } elseif (tep_not_null($width) && empty($height)) { $ratio = $width / $image_size[0]; $height = $image_size[1] * $ratio; } elseif (empty($width) && empty($height)) { $width = $image_size[0]; $height = $image_size[1]; } } elseif (IMAGE_REQUIRED == 'false') { return false; } } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } //// // The HTML form submit button wrapper function // Outputs a button in the selected language function tep_image_submit($image, $alt = '', $parameters = '') { global $language; $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "'; if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters; $image_submit .= '>'; return $image_submit; } //// // Output a function button in the selected language function tep_image_button($image, $alt = '', $parameters = '') { global $language; return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters); } //// // Output a separator either through whitespace, or with an image function tep_draw_separator($image = 'pixel_black.gif', $width = '100%', $height = '1') { return tep_image(DIR_WS_IMAGES . $image, '', $width, $height); } //// // Output a form function tep_draw_form($name, $action, $method = 'post', $parameters = '') { $form = '<form name="' . tep_output_string($name) . '" action="' . tep_output_string($action) . '" method="' . tep_output_string($method) . '"'; if (tep_not_null($parameters)) $form .= ' ' . $parameters; $form .= '>'; return $form; } //// // Output a form input field function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) { $field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } elseif (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Output a form password field function tep_draw_password_field($name, $value = '', $parameters = 'maxlength="40"') { return tep_draw_input_field($name, $value, $parameters, 'password', false); } //// // Output a selection field - alias function for tep_draw_checkbox_field() and tep_draw_radio_field() function tep_draw_selection_field($name, $type, $value = '', $checked = false, $parameters = '') { $selection = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) $selection .= ' value="' . tep_output_string($value) . '"'; if ( ($checked == true) || ( isset($GLOBALS[$name]) && is_string($GLOBALS[$name]) && ( ($GLOBALS[$name] == 'on') || (isset($value) && (stripslashes($GLOBALS[$name]) == $value)) ) ) ) { $selection .= ' CHECKED'; } if (tep_not_null($parameters)) $selection .= ' ' . $parameters; $selection .= '>'; return $selection; } //// // Output a form checkbox field function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters); } //// // Output a form radio field function tep_draw_radio_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'radio', $value, $checked, $parameters); } //// // Output a form textarea field function tep_draw_textarea_field($name, $wrap, $width, $height, $text = '', $parameters = '', $reinsert_value = true) { $field = '<textarea name="' . tep_output_string($name) . '" wrap="' . tep_output_string($wrap) . '" cols="' . tep_output_string($width) . '" rows="' . tep_output_string($height) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) { $field .= stripslashes($GLOBALS[$name]); } elseif (tep_not_null($text)) { $field .= $text; } $field .= '</textarea>'; return $field; } //// // Output a form hidden field function tep_draw_hidden_field($name, $value = '', $parameters = '') { $field = '<input type="hidden" name="' . tep_output_string($name) . '"'; if (tep_not_null($value)) { $field .= ' value="' . tep_output_string($value) . '"'; } elseif (isset($GLOBALS[$name])) { $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"'; } if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; return $field; } //// // Hide form elements function tep_hide_session_id() { global $session_started, $SID; if (($session_started == true) && tep_not_null($SID)) { return tep_draw_hidden_field(tep_session_name(), tep_session_id()); } } //// // Output a form pull down menu function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) $field .= ' ' . $parameters; $field .= '>'; if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]); for ($i=0, $n=sizeof($values); $i<$n; $i++) { $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; } $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>'; if ($required == true) $field .= TEXT_FIELD_REQUIRED; return $field; } //// // Creates a pull-down list of countries function tep_get_country_list($name, $selected = '223', $parameters = '') { $countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $countries = tep_get_countries(); for ($i=0, $n=sizeof($countries); $i<$n; $i++) { $countries_array[] = array('id' => $countries[$i]['countries_id'], 'text' => $countries[$i]['countries_name']); } return tep_draw_pull_down_menu($name, $countries_array, $selected, $parameters); } ?>
  14. Quick Question: I am installing the PAGE CACHE contrib and now I am on step 3. It says to execute the file as shown below. I am new to SQL but have been in PHP MY ADMIN browsing around the databases and getting my feet wet! My question is what is the easiest way to execute this .sql file? Do I import it and run it or can I just upload it onto my server and type in the file name from my browser to make it execute automatically? Just a little confused and I am sure there is someone who can explain this easy. Also I am assuming this .SQL file makes some type of new sql database or something right? THX! ---------------------------------------------------------------------- STEP 3 - From phpMyAdmin or other convenient method execute the SQL file. The SQL file is called page_cache.sql and is located in the sql directory of this contribution. -------------------------------------------------------------------------- THX AGAIN! Steve
  15. sharplab

    Help!

    Our store is just starting to get orders and we our last 4 orders came through PayPal. All is OKAY BUT..... We have no idea what our customers are ordering when paying through PayPal. We also have no record of them in cart admin under: Customers>>Orders BUT..... We have find them when we seach for CUSTOMERS Okay so what to do? Obviously something is missign somewhere. Also we want to add the PayPal fee to our customers order when they choose this method. It this an UNWISE thing to do? The problem is our prices are so competitive that we only have a small markup on our top sellers. Any advice? THANKS! Steve
  16. We own a nutrition store that just got indexed fully by Google. About 2 weeks ago we changes some of the Category names for better SEO. We have ultimate SEO contrib installed. We also have about 20 domains which contain hundreds of pages each which are filled with store related info. NOW HERE's the PROBLEM: All of these web sites now contain the old link to our store such as: OLD - catalog/widgets-coolwidgets-p98-html - OLD LINK SAME CONTENT NEW - catalog/widgets-discountcoolwidgets-p99.html - NEW LINK SAME CONTENT EXACTLY AS OLD LINK We dont want to ge penalized from Google for having the so called duplicate pages. DO WE HAVE TO CHANGE LITERALLY 1000'S OF WEB PAGES? or is there another way like set up a 301 or something for the old links. What can we do to avoid changing all those pages? There has to be an easier way!!!! We have changed only about 5 store categories but this has affected all our incoming links from our other web sites out there which have 1000's of static page info. HELP! HELP! Thanks all! Steve
  17. Hi All! I want to add an OSC forum to my shopping cart. Can anyone direct me with a link to the contribution? I cant find it! Thanks!
  18. Has anyone used the auto froogle (google base) feed upload on their osc cart? I want to install and config it but need some feedback if it works well. I am assuming this is to send your entire product list to froogle once per month and AUTOMATICALLY! Does it work well? Steve
×
×
  • Create New...