Jump to content
Latest News: (loading..)

fszone

Members
  • Content count

    111
  • Joined

  • Last visited

1 Follower

Profile Information

  1. fszone

    Shipping costs calculation

    It does not work :( I get other 3 input text boxes in the form. but all i write there it is not stored in the database. When i reload the page all is empty again
  2. I need to calculate the shipping cost for the online shop according to these rules... If the customer lives in my region .............. 7.5 euros If he lives in other region, in my country ...... 8.5 euros If he selected "cash on delivery", an increment of 5% of all (price+sipping costs) ¿I need to create a new tax zone for my region? ¿What add-on to select the zones? ¿Where i can increment the 5% for cash on delivery? New user with oscommerce, a bit confused THANKS
  3. fszone

    Paypal Express Checkout Process

    Don't know if this applies, but are you sure you're eligible to use Express? What I mean is Paypal requires you to have a merchant account to use Express. I only found that out on this page: https://www.paypal.com/us/cgi-bin/webscr?cmd=_profile-comparison . Before that, I thought anyone could use it. BTW, that page was very hard to find and I was trying to use Express without a merchant account and could never get it working. It would just return /catalog/shopping_cart.php?error_message=. If you only want to use Standard (very easy to setup, just put in your email) you can speed up the process by installing PWA (Purchase without account). http://www.oscommerce.com/community/contributions,355 You can also replace /catalog/includes/languages/english/images/buttons/button_checkout.gif with a Paypal button, so people know they're using Paypal.
  4. OMG! I´ve read all the thread! And I can´t find my problem. Image Magic doesn´t appear in my ADMIN zone... ¿Any idea? Some one fixed this problem im some post, but didn´t posted "how". I paste my files, thx in advance! ROOT/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 (c) 2003 osCommerce Released under the GNU General Public License */ //// // The HTML href link wrapper function // BOF Image Magic function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { global $product_info; //Allow for a new intermediate sized thumbnail size to be set //without any changes having to be made to the product_info page itself. //(see the lengths I go to to make your life easier :-) if (strstr($_SERVER['PHP_SELF'],"product_info.php")) { if (isset($product_info['products_image']) && $src == DIR_WS_IMAGES . $product_info['products_image'] && $product_info[products_id]==$_GET['products_id']) { //final check just to make sure that we don't interfere with other contribs $width = PRODUCT_INFO_IMAGE_WIDTH == 0?'':PRODUCT_INFO_IMAGE_WIDTH; $height = PRODUCT_INFO_IMAGE_HEIGHT == 0?'':PRODUCT_INFO_IMAGE_HEIGHT; $product_info_image=true; $page="prod_info"; } } //Detect whether this is a pop-up image if (strstr($_SERVER['PHP_SELF'],"popup_image.php")) $page="popup"; //do we apply the IE PNG alpha transparency fix? if (strstr(strtolower($src),".png") && CFG_PNG_BUG=="True") $fix_png = true; //send the image for processing unless told otherwise $image = '<img src="' . $src . '"'; //set up the image tag just in case we don't want to process if (CFG_MASTER_SWITCH=="On") $calculate = true; else $calculate=false; // Don't calculate if the image is set to a "%" width if (strstr($width,'%') == true || strstr($height,'%') == true) $calculate = false; // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale) if (strstr($image, 'pixel')) $calculate = false; $image_size = @getimagesize($src); // Decide whether or not we want to process this image if (($width == '' && $height == '' && $page != 'popup' ) || ($width == $image_size[0] && $height == $image_size[0] && $page != 'popup')) { if (CFG_PROCESS_GRAPHICS=="False") $calculate = false; //looks like this is a store graphic rather than product image } // Is this image good to go? if (CONFIG_CALCULATE_IMAGE_SIZE && $calculate) { if ($image_size) { $ratio = $image_size[1] / $image_size[0]; // Set the width and height to the proper ratio if (!$width && $height) { $ratio = $height / $image_size[1]; $width = intval($image_size[0] * $ratio); } elseif ($width && !$height) { $ratio = $width / $image_size[0]; $height = intval($image_size[1] * $ratio); } elseif (!$width && !$height && !$over_ride) { $width = $image_size[0]; $height = $image_size[1]; } //Encrypt the image filename if switched on if (CFG_ENCRYPT_FILENAMES == "True" && CFG_ENCRYPTION_KEY !="") { $result = ''; $key=CFG_ENCRYPTION_KEY; for($i=0; $i<strlen($src); $i++) { $char = substr($src, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } $src=urlencode(base64_encode($result)); } //Return the html $image = '<img src="imagemagic.php?img='.$src.'&w='. tep_output_string($width).'&h='.tep_output_string($height).'&page='.$page.'"'; } elseif (IMAGE_REQUIRED == 'false') { return false; } } //If the size asked for is greater than the image itself, we check the configs to see if this is allowed and if not over-ride if ($width > $image_size[0] || $height > $image_size[1]) { if (CFG_ALLOW_LARGER != 'True'){ $width=$image_size[0]; $height=$image_size[1]; $over_ride = true; } } // Add remaining image parameters if they exist if ($width) { $image .= ' width="' . tep_output_string($width) . '"'; } if ($height) { $image .= ' height="' . tep_output_string($height) . '"'; } if (tep_not_null($params)) $image .= ' ' . $params; $image .= ' border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title="' . tep_output_string($alt) . '"'; } if ($fix_png && CFG_MASTER_SWITCH=="On") { $image .= ' onload="fixPNG(this)"'; } $image .= '>'; return $image; } //EOF Image Magic // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { if (tep_not_null($SID)) { $_sid = $SID; } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); $link = str_replace('?', '/', $link); $link = str_replace('&', '/', $link); $link = str_replace('=', '/', $link); $separator = '?'; } if (isset($_sid)) { $link .= $separator . $_sid; } return $link; } //// // The HTML image wrapper function // BOF Image Magic function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { global $product_info; //Allow for a new intermediate sized thumbnail size to be set //without any changes having to be made to the product_info page itself. //(see the lengths I go to to make your life easier :-) if (strstr($_SERVER['PHP_SELF'],"product_info.php")) { if (isset($product_info['products_image']) && $src == DIR_WS_IMAGES . $product_info['products_image'] && $product_info[products_id]==$_GET['products_id']) { //final check just to make sure that we don't interfere with other contribs $width = PRODUCT_INFO_IMAGE_WIDTH == 0?'':PRODUCT_INFO_IMAGE_WIDTH; $height = PRODUCT_INFO_IMAGE_HEIGHT == 0?'':PRODUCT_INFO_IMAGE_HEIGHT; $product_info_image=true; $page="prod_info"; } } //Detect whether this is a pop-up image if (strstr($_SERVER['PHP_SELF'],"popup_image.php")) $page="popup"; //do we apply the IE PNG alpha transparency fix? if (strstr(strtolower($src),".png") && CFG_PNG_BUG=="True") $fix_png = true; //send the image for processing unless told otherwise $image = '<img src="' . $src . '"'; //set up the image tag just in case we don't want to process if (CFG_MASTER_SWITCH=="On") $calculate = true; else $calculate=false; // Don't calculate if the image is set to a "%" width if (strstr($width,'%') == true || strstr($height,'%') == true) $calculate = false; // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale) if (strstr($image, 'pixel')) $calculate = false; $image_size = @getimagesize($src); // Decide whether or not we want to process this image if (($width == '' && $height == '' && $page != 'popup' ) || ($width == $image_size[0] && $height == $image_size[0] && $page != 'popup')) { if (CFG_PROCESS_GRAPHICS=="False") $calculate = false; //looks like this is a store graphic rather than product image } // Is this image good to go? if (CONFIG_CALCULATE_IMAGE_SIZE && $calculate) { if ($image_size) { $ratio = $image_size[1] / $image_size[0]; // Set the width and height to the proper ratio if (!$width && $height) { $ratio = $height / $image_size[1]; $width = intval($image_size[0] * $ratio); } elseif ($width && !$height) { $ratio = $width / $image_size[0]; $height = intval($image_size[1] * $ratio); } elseif (!$width && !$height && !$over_ride) { $width = $image_size[0]; $height = $image_size[1]; } //Encrypt the image filename if switched on if (CFG_ENCRYPT_FILENAMES == "True" && CFG_ENCRYPTION_KEY !="") { $result = ''; $key=CFG_ENCRYPTION_KEY; for($i=0; $i<strlen($src); $i++) { $char = substr($src, $i, 1); $keychar = substr($key, ($i % strlen($key))-1, 1); $char = chr(ord($char)+ord($keychar)); $result.=$char; } $src=urlencode(base64_encode($result)); } //Return the html $image = '<img src="imagemagic.php?img='.$src.'&w='. tep_output_string($width).'&h='.tep_output_string($height).'&page='.$page.'"'; } elseif (IMAGE_REQUIRED == 'false') { return false; } } //If the size asked for is greater than the image itself, we check the configs to see if this is allowed and if not over-ride if ($width > $image_size[0] || $height > $image_size[1]) { if (CFG_ALLOW_LARGER != 'True'){ $width=$image_size[0]; $height=$image_size[1]; $over_ride = true; } } // Add remaining image parameters if they exist if ($width) { $image .= ' width="' . tep_output_string($width) . '"'; } if ($height) { $image .= ' height="' . tep_output_string($height) . '"'; } if (tep_not_null($params)) $image .= ' ' . $params; $image .= ' border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title="' . tep_output_string($alt) . '"'; } if ($fix_png && CFG_MASTER_SWITCH=="On") { $image .= ' onload="fixPNG(this)"'; } $image .= '>'; return $image; } //EOF Image Magic //// // 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 = '', $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); } ?> And ONLY THE LAST PART of my ROOT/admin/includes/functions/general.php // make sure no duplicate category IDs exist which could lock the server in a loop $tmp_array = array(); $n = sizeof($cPath_array); for ($i=0; $i<$n; $i++) { if (!in_array($cPath_array[$i], $tmp_array)) { $tmp_array[] = $cPath_array[$i]; } } return $tmp_array; } function tep_cfg_readonly($value){ $single[]= array('id' => $value, 'text' => $value); return tep_draw_pull_down_menu('configuration_value', $single, $value); } function tep_cfg_pull_down_installed_fonts($font_name) { if ($root=@opendir(DIR_FS_DOCUMENT_ROOT.'includes/imagemagic/fonts')){ while ($file=readdir($root)){ if($file=="." || $file==".." || is_dir($dir."/".$file)) continue; $files[]= array('id' => $file, 'text' => $file); } } return tep_draw_pull_down_menu('configuration_value', $files, $font_name); } function tep_cfg_pull_down_installed_watermarks($watermark_name) { if ($root=@opendir(DIR_FS_DOCUMENT_ROOT.'includes/imagemagic/watermarks')){ while ($file=readdir($root)){ if($file=="." || $file==".." || is_dir($dir."/".$file)) continue; $files[]= array('id' => $file, 'text' => $file); } } return tep_draw_pull_down_menu('configuration_value', $files, $watermark_name); } function tep_cfg_pull_down_watermark_alignment($watermark_alignment) { $align[]= array('id' => 'Tiled', 'text' => 'Tiled'); $align[]= array('id' => 'Top', 'text' => 'Top'); $align[]= array('id' => 'Top Left', 'text' => 'Top Left'); $align[]= array('id' => 'Top Right', 'text' => 'Top Right'); $align[]= array('id' => 'Center', 'text' => 'Center'); $align[]= array('id' => 'Bottom', 'text' => 'Bottom'); $align[]= array('id' => 'Bottom Left', 'text' => 'Bottom Left'); $align[]= array('id' => 'Bottom Right', 'text' => 'Bottom Right'); return tep_draw_pull_down_menu('configuration_value', $align, $watermark_alignment); } ?> I´ve follow all the instructions, I´m running OSC 2.2ms2, and imagemagic 1.16 (I couldn´t find a later version) Thanks!
  5. I don't even want to ask.......
  6. for work, please uncomment lines: 14, 23, 26-28
  7. I found that product in your shop and it seems that it contains special character (r in circle - registered). That can confuse redirect if not properly encoded. I think you should specify special replacement character for this char (and maybe other specials too). But now redirect seems to work on your site. If my browser does not have problems with it then google shouldn't have either.
  8. Are there any drawbacks when using ARRAY mode to cache data in database? By default it uses EVAL but from my tests ARRAY method is at least twice as fast with about 24.000 products.
  9. Hi guys, I have an online shop (link) in which I sell server cabinets and such. I created it using the software package ShopFactory, (link) but after some time i found that the software was limiting what I could do with the site. So I decided to switch to OScommerce. Unfortunately ShopFactory won't let me export my product catalog (which is some hundreds of products large) in any way. So; my question; is there any way for oscommerce (with the help of a module, maybe?) to 'grab' the product information of of my website and insert it into its database? Help would be very much appreciated since creating a new database from scratch would take many, many hours.
  10. FWR Media: I've switched to your version and want to suggest some minor fixes: NOTICES generated in few places: 1) add $_sid = null; at the beggining of function add_sid. There are cases where code that sets $_sid not always executes and so the notice. 2) add $container = array(); somewhere in the begging of function short_name. Same case as above. BROKEN code: 1) generate_categories_cache function does not generate categories cache because sql query is broken. Some of the uploaded versions had this fixed but not your revision. You will see the problem by looking in database or removing error supressing (@) sign from mysql_query function in "Query" funciton. I have changed query in generate_categories_cache function to this (not sure it's 100% correct in all cases but works for me): $sql = "SELECT c.categories_id as id, c.parent_id, cd.categories_name as cName, cd2.categories_name as pName FROM ".TABLE_CATEGORIES." c LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd ON c.categories_id = cd.categories_id LEFT JOIN ".TABLE_CATEGORIES_DESCRIPTION." cd2 ON c.parent_id=cd2.categories_id AND cd2.language_id='".(int)$this->languages_id."' WHERE c.categories_id=cd.categories_id AND cd.language_id='".(int)$this->languages_id."'"; 2) after header("Location: $url"); in function "do_redirect" add "exit;" call. Not sure it's that important for google but for sure will make redirect a bit faster. USE OF NON EXISTING function: 1) search for $this->keep_in_memory and remove this method call. This method is used but not defined anywhere. I think original versions by Chemo had this problem too. Consider adding Validatename function that exists in some of the versions. It looks to be very usefull in some situations. For example: 1) Google finds link /my-pink-bunny-p-10.html in shop. 2) You decide to change name of this product so that new link becomes /my-black-bunny-p-10.html 3) Cache expires after a month and now product listing contains link /my-black-bunny-p-10.html 3) Google finds new link but also "remembers" old link which still works so now it has two same pages with different links. I guess this is bad for google. With Validatename function, when google checks first link, it gets pointed to new link by permanent redirect and so now it has this page only once in its database.
  11. I'm using "Ultimate Seo Urls v2.5 FullPackage" and have one question. Why there is a url = preg_replace('/&/','&',$url); line at the end of the script, after last curly bracket? It generates notices and does seem to be in good place. What $url variable does it change? Certainly not the one that is defined inside seo class.
  12. Can someone recommend a "code compare" application for Mac, that can help make the installation process a little easier? Thanks.
  13. fszone

    Who's Online Enhancement 1.4

    I have moved to new server recently and installed this contribution. Problem is that it does not work by default. I think I have tracked down the issue to session handling by my server. It seem to crypt session values because when I look at session table data is not readable (looks like base64 encoding but is not). And because of that, script can't show basket content because it gets this data from session value and what's more, it gets into infinite loop in one place in script. Loop can be fixed by adding: if ( $start_id === false ) $start_id = 0; if ( $start_cart === false ) $start_cart = 0; if ( $start_currency === false ) $start_currency = 0; if ( $start_country === false ) $start_country = 0; if ( $start_zone === false ) $start_zone = 0; after: $start_id = strpos($session_data, 'customer_id|s'); $start_cart = strpos($session_data, 'cart|O'); $start_currency = strpos($session_data, 'currency|s'); $start_country = strpos($session_data, 'customer_country_id|s'); $start_zone = strpos($session_data, 'customer_zone_id|s'); but it does not fix missing basket. Can anyone think of some workaround for this issue? Can I somehow see real session data in my script?
  14. fszone

    Quantity Price Breaks

    Thanks Jan, that works great!
  15. fszone

    Quantity Price Breaks

    I encountered the same problem with my /catalog/admin/ directory. Try resetting the login & password information for that directory.
×