Jump to content

CnTGifts

Members
  • Content count

    140
  • Joined

  • Last visited

1 Follower

Profile Information

  1. ive uninstalled reinstalled and i cant get it working on this new domain same host just got a new domain name for it My includes/functions/html_output.php file is <?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 */ //// // 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 // 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 ''; } } //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 .= tep_output_string_protected(stripslashes($GLOBALS[$name])); } elseif (tep_not_null($text)) { $field .= tep_output_string_protected($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); } ////rmh referral // Creates a pull-down list of sources function tep_get_source_list($name, $show_other = false, $selected = '', $parameters = '') { $sources_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT)); $sources = tep_get_sources(); for ($i=0, $n=sizeof($sources); $i<$n; $i++) { $sources_array[] = array('id' => $sources[$i]['sources_id'], 'text' => $sources[$i]['sources_name']); } if ($show_other == 'true') { $sources_array[] = array('id' => '9999', 'text' => PULL_DOWN_OTHER); } return tep_draw_pull_down_menu($name, $sources_array, $selected, $parameters); } ?> You see anythign wrong with it cuz i cant :blush:
  2. i changed my domain name and now image magic wont work http://www.cnt-wholesale.com Any ideas
  3. can someone please make this compatible with header tags controller and Display MSRP & Savings by wdepot 22 Sep 2005
  4. my images wotn work with image magic turned on Cache Thumbnails on the Server False Cache Thumbnails in user's browser False
  5. CnTGifts

    How Did You Hear About Us - Support

    sorry for the double post How do you fix this
  6. CnTGifts

    How Did You Hear About Us - Support

    How did you fix this
  7. CnTGifts

    Automatically send data feed to Froogle

    when i run the script it dont automatically upload to froogle
  8. CnTGifts

    Automatically send data feed to Froogle

    When I cut/paste this: define('BOX_HEADING_FEEDERS', 'Feeder Systems'); define('BOX_FEEDERS_AMAZON', 'Amazon Marketplace'); define('BOX_FEEDERS_BIZRATE', 'Biz Rate'); define('BOX_FEEDERS_FROOGLE', 'Froogle'); define('BOX_FEEDERS_MYSIMON', 'MySimon'); define('BOX_FEEDERS_PRICE_GRABBER', 'Price Grabber'); define('BOX_FEEDERS_SHOPPING', 'Shopping.com'); define('BOX_FEEDERS_YAHOO', 'Yahoo'); define('BOX_FEEDERS_GOOGLE_BASE', 'Google Base'); How come only BizRate: Biz Rate Froogle: Froogle Yahoo: Yahoo Show up in admin
  9. CnTGifts

    Seperate Pricing Per Customer v3.5

    My Problem has been fixed
  10. CnTGifts

    Seperate Pricing Per Customer v3.5

    ok im usign this to have retail and whoelsale so it will show both prices is there a way that when everyone registeres they automatically go in the wholesale group
  11. CnTGifts

    Seperate Pricing Per Customer v3.5

    think i got ti sorted now thanks
  12. CnTGifts

    Seperate Price per customer

    can i get some help with this i really need thos contrib
  13. umm how do you install both of these i isntalles SPPC then am tryign to install SPL for SPPC and the edits require the same thigns to be edited like the first one Open the file catalog/product_info.php Find the following lines between line 81 and 105 starting with : $product_info_query = tep_db_query("select p.products_id, ends just before: if (tep_not_null($product_info['products_model'])) } ) is whats in the file i would need to overwrite the modifications done by the SPPC $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) {
  14. CnTGifts

    Seperate Pricing Per Customer v3.5

    umm how do you install both of these i isntalles SPPC then am tryign to install SPL for SPPC and the edits require the same thigns to be edited like the first one Open the file catalog/product_info.php Find the following lines between line 81 and 105 starting with : $product_info_query = tep_db_query("select p.products_id, ends just before: if (tep_not_null($product_info['products_model'])) } ) is whats in the file i would need to overwrite the modifications done by the SPPC $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'"); $product_info = tep_db_fetch_array($product_info_query); tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'"); if ($new_price = tep_get_products_special_price($product_info['products_id'])) { // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { // BOF Separate Price per Customer $scustomer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id']. "' and customers_group_id = '" . $customer_group_id . "'"); if ($scustomer_group_price = tep_db_fetch_array($scustomer_group_price_query)) { $product_info['products_price']= $scustomer_group_price['customers_group_price']; } // EOF Separate Price per Customer $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); } if (tep_not_null($product_info['products_model'])) {
×