Jump to content
Latest News: (loading..)

ce7

Members
  • Content count

    483
  • Joined

  • Last visited

  • Days Won

    1

ce7 last won the day on June 5 2015

ce7 had the most liked content!

Profile Information

  • Real Name
    lyn

Recent Profile Visitors

12,923 profile views
  1. ce7

    configuration values

    Hi, I have BS Frozen version with few addons, the addon i am having issue is Random Unique Code ( Author copy from Handling Fee (http://addons.oscommerce.com/info/1190) ), they both have same configuration problem. The correct one (one the right) should show up the description : 9546 Allow Unique Code Do you want to allow Unique Code? However it doesn't shop up, as see on the left. Here are the code: tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('9546 Display Unique Code', 'MODULE_ORDER_TOTAL_UNIQUECODE_STATUS', 'true', 'Do you want to display the Unique Code?', '6', '1','tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', '9546 MODULE_ORDER_TOTAL_UNIQUECODE_SORT_ORDER', '4', 'Sort order of display.', '6', '2', now())"); // BOF Not show up properly tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('9546 Allow Unique Code', 'MODULE_ORDER_TOTAL_UNIQUECODE_HANDLING_FEE', 'true', 'Do you want to allow Unique Codes?', '6', '3', 'tep_cfg_select_option(array(\'true\', \'false\'), ', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('9546 Unique Code For Orders Under', 'MODULE_ORDER_TOTAL_UNIQUECODE_ORDER_UNDER', '50', 'Add the Unique Code to orders under this amount.', '6', '4', 'currencies->format', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('9546 How many unique code digit?', 'MODULE_ORDER_TOTAL_UNIQUECODE_DIGIT', '2', 'How many unique digit you want to setup?', '6', '8', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, date_added) values ('9546 Unique Code', 'MODULE_ORDER_TOTAL_UNIQUECODE_FEE', '5', 'Low order fee.', '6', '5', 'currencies->format', now())"); tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('9546 Attach Unique Code On Orders Made', 'MODULE_ORDER_TOTAL_UNIQUECODE_DESTINATION', 'both', 'Attach Unique Code for orders sent to the set destination.', '6', '6', 'tep_cfg_select_option(array(\'national\', \'international\', \'both\'), ', now())"); // EOF Not show up properly tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('9546 Tax Class', 'MODULE_ORDER_TOTAL_UNIQUECODE_TAX_CLASS', '0', 'Use the following tax class on the Unique Code.', '6', '7', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())"); [/php} Can someone please help and point out what is wrong here? Many thanks! Lyn
  2. ce7

    Product Extra Field

    Hey Eddy, @Moxamint Thank you very much! Found 2202, and 8528, not realize another one 7810, thank you very much, I will give it a try and yes i am interested in those files, thank you again for your generous help! Lyn
  3. ce7

    Product Extra Field

    @Clau123 @fotovideoat @mihelicjm Hi there, I have BS Frozen with few addons, and trying to install a new add on "product extra field", it seems working with admin, that i can create new product extra field, and add content to extra field in product page and saved, however having trouble to make the saved extra filed show up in the front end catalog product_info page. here is a product_info.php code for version 2.3 from the addon download: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2014 osCommerce Released under the GNU General Public License */ require('includes/application_top.php'); if (!isset($HTTP_GET_VARS['products_id'])) { tep_redirect(tep_href_link(FILENAME_DEFAULT)); } require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO); $product_check_query = tep_db_query("select count(*) as total 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_check = tep_db_fetch_array($product_check_query); require(DIR_WS_INCLUDES . 'template_top.php'); if ($product_check['total'] < 1) { ?> <div class="contentContainer"> <div class="contentText"> <?php echo TEXT_PRODUCT_NOT_FOUND; ?> </div> <div style="float: right;"> <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?> </div> </div> <?php } else { $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'])) { $products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>'; } else { $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'])) { $products_name = $product_info['products_name'] . '<br /><span class="smallText">[' . $product_info['products_model'] . ']</span>'; } else { $products_name = $product_info['products_name']; } ?> <?php /* // START: Extra Fields Contribution v2.0b - mintpeel display fix $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_order, pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."') ORDER BY pef.products_extra_fields_order"); echo '<tr> <td> <table border="0" width="50%" cellspacing="0" cellpadding="2px">'; while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { if (! $extra_fields['status']) // show only enabled extra field continue; echo'<tr><td class="main" align="left" valign="middle"><font size="1" color="#666666"><b>'.$extra_fields['name'].': </b>' . stripslashes($extra_fields['value']).'</font></td></tr>'; } echo' </table> </td> </tr>'; // END: Extra Fields Contribution - mintpeel display fix */ ?> <?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?> <div> <h1 style="float: right;"><?php echo $products_price; ?></h1> <h1><?php echo $products_name; ?></h1> </div> <div class="contentContainer"> <div class="contentText"> <?php if (tep_not_null($product_info['products_image'])) { $photoset_layout = '1'; $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order"); $pi_total = tep_db_num_rows($pi_query); if ($pi_total > 0) { $pi_sub = $pi_total-1; while ($pi_sub > 5) { $photoset_layout .= 5; $pi_sub = $pi_sub-5; } if ($pi_sub > 0) { $photoset_layout .= ($pi_total > 5) ? 5 : $pi_sub; } ?> <div id="piGal"> <?php $pi_counter = 0; $pi_html = array(); while ($pi = tep_db_fetch_array($pi_query)) { $pi_counter++; if (tep_not_null($pi['htmlcontent'])) { $pi_html[] = '<div id="piGalDiv_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>'; } echo tep_image(DIR_WS_IMAGES . $pi['image'], '', '', '', 'id="piGalImg_' . $pi_counter . '"'); } ?> </div> <?php if ( !empty($pi_html) ) { echo ' <div style="display: none;">' . implode('', $pi_html) . '</div>'; } } else { ?> <div id="piGal"> <?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name'])); ?> </div> <?php } } ?> <script type="text/javascript"> $(function() { $('#piGal').css({ 'visibility': 'hidden' }); $('#piGal').photosetGrid({ layout: '<?php echo $photoset_layout; ?>', width: '250px', highresLinks: true, rel: 'pigallery', onComplete: function() { $('#piGal').css({ 'visibility': 'visible'}); $('#piGal a').colorbox({ maxHeight: '90%', maxWidth: '90%', rel: 'pigallery' }); $('#piGal img').each(function() { var imgid = $(this).attr('id').substring(9); if ( $('#piGalDiv_' + imgid).length ) { $(this).parent().colorbox({ inline: true, href: "#piGalDiv_" + imgid }); } }); } }); }); </script> <?php echo stripslashes($product_info['products_description']); ?> <?php // START: Extra Fields Contribution v2.0b - mintpeel display fix $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_order, pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."') ORDER BY pef.products_extra_fields_order"); echo '<tr> <td> <table border="0" width="50%" cellspacing="0" cellpadding="2px">'; while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { if (! $extra_fields['status']) // show only enabled extra field continue; echo'<tr><td class="main" align="left" valign="middle"><font size="1" color="#666666"><b>'.$extra_fields['name'].': </b>' . stripslashes($extra_fields['value']).'</font></td></tr>'; } echo' </table> </td> </tr>'; // END: Extra Fields Contribution - mintpeel display fix ?> <?php $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { ?> <p><?php echo TEXT_PRODUCT_OPTIONS; ?></p> <p> <?php $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') '; } } if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) { $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]; } else { $selected_attribute = false; } ?> <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?><br /> <?php } ?> </p> <?php } ?> <div style="clear: both;"></div> <?php if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) { ?> <p style="text-align: center;"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></p> <?php } ?> </div> <?php $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and reviews_status = 1"); $reviews = tep_db_fetch_array($reviews_query); ?> <div class="buttonSet"> <span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span> <?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?> </div> <?php if ((USE_CACHE == 'true') && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS); } ?> </div> </form> <?php } require(DIR_WS_INCLUDES . 'template_bottom.php'); require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> the main modification is here: <?php echo stripslashes($product_info['products_description']); ?> <?php // START: Extra Fields Contribution v2.0b - mintpeel display fix $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_order, pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."') ORDER BY pef.products_extra_fields_order"); echo '<tr> <td> <table border="0" width="50%" cellspacing="0" cellpadding="2px">'; while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { if (! $extra_fields['status']) // show only enabled extra field continue; echo'<tr><td class="main" align="left" valign="middle"><font size="1" color="#666666"><b>'.$extra_fields['name'].': </b>' . stripslashes($extra_fields['value']).'</font></td></tr>'; } echo' </table> </td> </tr>'; // END: Extra Fields Contribution - mintpeel display fix So I tried to put this code in BS version @ includes/modules/content/product_info/templates/tpl_cm_pi_description.php <?php echo $product_description . '<br/>'; //BOF 8528 Product Extra Fields $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_order, pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=". (int)$_GET['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."') ORDER BY pef.products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { if (! $extra_fields['status']) // show only enabled extra field continue; echo $extra_fields['name'].': </b>' . stripslashes($extra_fields['value']); } //EOF 8528 Product Extra Fields ?> and below attached image is the correct one that show up extra fields: EAN Code: ISBN Code: however my modification did not show up any fields, can some one please help? Many thanks! Lyn
  4. @Jack_mcs Hi, Thank you for the wonderful addon, I had installed it in BS frozen, and it is working great! I love the fact it can edit any page. I spend weeks to tried the version 2.2 and 2.3 before with no luck!!! Tried to install several times and could not see the pages, thought I made mistake or not working, but finally I read the "read me - additional" and find the important statement, ADD LINKS TO THE INFORMATION BOX: @ includes/modules/boxes/templates/information.php under the <ul>, add code: <?php echo tep_information_show_category(1,999, true); ?> however I still very confuse about the BOX ID and Parent ID. And I think the ID is for showing on the URL, it is not practical for admin to know which ID is to match if they are not the one put this addon.... is there a way, for example, have a drop down list, and will show both ID, and corresponding box or page name? Many thanks! Lyn
  5. ce7

    Product Name length

    Hi all, @Hotclutch @JcMagpie @MrPhil @Dan Cole @ArtcoInc thank you for all the generous supports. I had tried the New Equal Height Modules, which working great. The index page is show as below: The image below show equal height on New Products page: the QUOTE and VIEW looks in different height level (without full screen), but if put it as full screen, it actually will align as same height level. What I am thinking of is to make button to be right each other, just like the one VIEW / BUY button on index page, that maybe will make the buttons looks in the same level height even if it is not full screen. Or is there a better way to do it? Thanks! Lyn
  6. ce7

    Product Name length

    @ArtcoInc I will try the solution provided and come back for update later, thanks!
  7. for people who may needed: solution: change code if (is_email_for_quote($listing['products_price'])) { to code if (is_email_for_quote($new_products['products_price'])) {
  8. Hi there, I have BS Frozen version install with Email for quote, modified the code, all seems doing what I like to show, except the button on index page, code related to catalog/includes/modules/product_listing.php and catalog/includes/modules/new_products.php My goal is to change the new product of the month BUY button next to View button, if the product price is 0, then QUOTE button replace with BUY button. I have modified two files that will change buttons from BUY to QUOTE, my problem here is that if will not filter if price is < 0, it is just simplely change all button BUY to QUOTE. However it does change conditionally when click on what's new infobox page. Please find the images for your reference. Please compare the product KEYBOARD ==================== error without condition < 0 applied ==================== ==================== condition < 0 applied on What's New page ==================== there are two files related to this change: --------------------------------------------------------------------------------------------------------------------------------------------- catalog/includes/modules/content/index/cm_in_new_products.php --------------------------------------------------------------------------------------------------------------------------------------------- <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2016 osCommerce Released under the GNU General Public License */ class cm_i_new_products { var $code; var $group; var $title; var $description; var $sort_order; var $enabled = false; function __construct() { $this->code = get_class($this); $this->group = basename(dirname(__FILE__)); $this->title = MODULE_CONTENT_NEW_PRODUCTS_TITLE; $this->description = MODULE_CONTENT_NEW_PRODUCTS_DESCRIPTION; $this->description .= '<div class="secWarning">' . MODULE_CONTENT_BOOTSTRAP_ROW_DESCRIPTION . '</div>'; if ( defined('MODULE_CONTENT_NEW_PRODUCTS_STATUS') ) { $this->sort_order = MODULE_CONTENT_NEW_PRODUCTS_SORT_ORDER; $this->enabled = (MODULE_CONTENT_NEW_PRODUCTS_STATUS == 'True'); } } function execute() { global $oscTemplate, $new_products_category_id, $languages_id, $currencies, $PHP_SELF, $currency; $content_width = MODULE_CONTENT_NEW_PRODUCTS_CONTENT_WIDTH; $product_width = MODULE_CONTENT_NEW_PRODUCTS_DISPLAY_EACH; if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price, p.products_quantity as in_stock, if(s.status, 1, 0) as is_special from products p left join specials s on p.products_id = s.products_id, products_description pd where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_id desc limit " . (int)MODULE_CONTENT_NEW_PRODUCTS_MAX_DISPLAY); } else { $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, pd.products_name, if(s.status, s.specials_new_products_price, p.products_price) as products_price, p.products_quantity as in_stock, if(s.status, 1, 0) as is_special from products p left join specials s on p.products_id = s.products_id, products_description pd, products_to_categories p2c, categories c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_id desc limit " . (int)MODULE_CONTENT_NEW_PRODUCTS_MAX_DISPLAY); } $num_new_products = tep_db_num_rows($new_products_query); if ($num_new_products > 0) { //BOF 8522 Email For Quote v1.2 if (is_email_for_quote($new_products['products_price'])) { $price_display = show_email_for_quote($new_products); } else { $price_display = $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); } //EOF 8522 Email For Quote v1.2 ob_start(); include('includes/modules/content/' . $this->group . '/templates/tpl_' . basename(__FILE__)); $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_CONTENT_NEW_PRODUCTS_STATUS'); } function install() { tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable New Products Module', 'MODULE_CONTENT_NEW_PRODUCTS_STATUS', 'True', 'Do you want to enable this module?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Content Width', 'MODULE_CONTENT_NEW_PRODUCTS_CONTENT_WIDTH', '12', 'What width container should the content be shown in? (12 = full width, 6 = half width).', '6', '2', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Maximum Display', 'MODULE_CONTENT_NEW_PRODUCTS_MAX_DISPLAY', '6', 'Maximum Number of products that should show in this module?', '6', '3', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Product Width', 'MODULE_CONTENT_NEW_PRODUCTS_DISPLAY_EACH', '3', 'What width container should each product be shown in? (12 = full width, 6 = half width).', '6', '4', 'tep_cfg_select_option(array(\'12\', \'11\', \'10\', \'9\', \'8\', \'7\', \'6\', \'5\', \'4\', \'3\', \'2\', \'1\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort Order', 'MODULE_CONTENT_NEW_PRODUCTS_SORT_ORDER', '300', 'Sort order of display. Lowest is displayed first.', '6', '5', now())"); } function remove() { tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_CONTENT_NEW_PRODUCTS_STATUS', 'MODULE_CONTENT_NEW_PRODUCTS_CONTENT_WIDTH', 'MODULE_CONTENT_NEW_PRODUCTS_MAX_DISPLAY', 'MODULE_CONTENT_NEW_PRODUCTS_DISPLAY_EACH', 'MODULE_CONTENT_NEW_PRODUCTS_SORT_ORDER'); } } ?> --------------------------------------------------------------------------------------------------------------------------------------------- catalog/includes/modules/content/index/templates/tpl_cm_i_new_products.php --------------------------------------------------------------------------------------------------------------------------------------------- <div class="col-sm-<?php echo $content_width; ?> cm-i-new-products"> <h3 class="h3"><?php echo sprintf(MODULE_CONTENT_NEW_PRODUCTS_HEADING, strftime('%B')); ?></h3> <div class="row list-group" itemscope itemtype="http://schema.org/ItemList"> <meta itemprop="numberOfItems" content="<?php echo (int)$num_new_products; ?>" /> <?php //BOF 8522 Email For Quote v1.2 if (is_email_for_quote($new_products['products_price'])) { $price_display = show_email_for_quote($new_products); } else { $price_display = $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); } //EOF 8522 Email For Quote v1.2 while ($new_products = tep_db_fetch_array($new_products_query)) { ?> <div class="col-sm-<?php echo $product_width; ?>" itemprop="itemListElement" itemscope="" itemtype="http://schema.org/Product"> <div class="thumbnail equal-height is-product" data-is-special="<?php echo (int)$new_products['is_special']; ?>"> <a href="<?php echo tep_href_link('product_info.php', 'products_id=' . (int)$new_products['products_id']); ?>"><?php echo tep_image('images/' . $new_products['products_image'], htmlspecialchars($new_products['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'itemprop="image"'); ?></a> <div class="caption"> <p class="text-center"><a itemprop="url" href="<?php echo tep_href_link('product_info.php', 'products_id=' . (int)$new_products['products_id']); ?>"><span itemprop="name"><?php echo $new_products['products_name']; ?></span></a></p> <hr> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php if (!is_email_for_quote($products_new['products_price'])) { ?> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <p class="text-center" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="<?php echo tep_output_string($currency); ?>" /><span itemprop="price" content="<?php echo $currencies->display_raw($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); ?>"><?php echo $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])); ?></span></p> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php } ?> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <div class="text-center"> <div class="btn-group"> <a href="<?php echo tep_href_link('product_info.php', tep_get_all_get_params(array('action')) . 'products_id=' . (int)$new_products['products_id']); ?>" class="btn btn-default" role="button"><?php echo MODULE_CONTENT_NEW_PRODUCTS_BUTTON_VIEW; ?></a> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php if (!is_email_for_quote($products_new['products_price'])) { ?> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php echo '<a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . (int)$new_products['products_id']) . '" data-has-attributes="' . ((tep_has_product_attributes((int)$new_products['products_id']) === true) ? '1' : '0') . '" data-in-stock="' . (int)$new_products['in_stock'] . '" data-product-id="' . (int)$new_products['products_id'] . '" class="btn btn-success btn-index btn-buy" role="button">' . MODULE_CONTENT_NEW_PRODUCTS_BUTTON_BUY . '</a>'; ?> <!-- BOF 8522 Email For Quote for v1.2 - Jan 2013 --> <?php } else { echo show_email_for_quote($products_new); } ?> <!-- EOF 8522 Email For Quote for v1.2 - Jan 2013 --> </div> </div> </div> </div> </div> <?php } ?> </div> </div> Any suggestion to fix this problem? Many thanks! Lyn
  9. ce7

    Product Name length

    Hi all there again, @Dan Cole @MrPhil @Hotclutch @JcMagpie Thank you for the advises. I had checked on configuration, but i can not find anywhere that allow me to modify the equal height for product listing. However I did search addon using "equal height" and this is the newest addon I think: New Equal Height Module (bootstrap). I will give it a try after I fix the problem for the button on index for product listing - New products of the month, thank you again to all of you! Lyn
  10. ce7

    Product Name length

    Hi all there again, @JcMagpie @Hotclutch I am using Boostrap CE frozen version. Not sure it is Boostrap 3 or Boostrap 4? I did not change any template design yet, just the original codes from frozen with few other addons, but nothing touch the css file related to this so far. The images on the top and at the bottom are the same webpage but in different browsing size. (the bottom one is full screen size) and the height change, also the buttons position looks different. So do i google " equal height divs " or "flex" to find solution? Thanks again! Lyn PS. sometimes the forums will show me alarm that i got reply sometimes I dont... like this one i did not get any alarm🤔
  11. ce7

    Product Name length

    Hi, file @ includes/modules/product_listing.php the code start from if (PRODUCT_LIST_NAME > 0) { is for product name. How can I define the code to detect if the product name request only 1(one) line length or 2 (two) lines length? As you can see from the attached image, if it is shorter product name, it will need only 1 line and the longer product name will need 2 lines which will make the square / price / button in different height level. To make sure it has the same height, I like to know if the product name string is longer, then request extra <br>, how can I achieve this? Many thanks! Lyn
  12. @14steve14 hi Steve, thank you for your reply again. Yes i will take your suggestion to use mailchip. During these couple days I have tried to talk to new hosting company. Just now they told me they can not find anything wrong with the setting, but the email can never been send out even it is not mark as spam. These 3 days after few chat and ticket communication, they told me to set up webmail which definately will not have hotmail or gmail spam problem. however with hotmail at least i got error message, with webmail, i got nothing, no send record, no receiving any email, but did receive new customer set up welcome email. That is all i can get every time, welcome email, nothing else. the new hosting company gave me this link: https://www.smarterasp.net/support/kb/a1498/how-to-setup-smtp-authentication-in-oscommerce-site-to-send-emails.aspx and ask me to come back to forum to ask help from developer.......(the code mentioned in the link is not exit in BS CE...) I am not sure if others having the same problem as me....just an updated for reference. Once again, thank you!
  13. @Dan Cole hi Dan, thanks for reply. regard to the spam, i already been marked as spam by hostpapa, not happy they did not inform me first. i changed the server company just before xmas and now start testing on new hosting company, but i can not even send email out at all even with right format, of course not newsletter too.... i think newsletter is very important nowaday, unfortunatelly i never can use newsletter function even i have several newsletter addons installed, but not able to send...and also facing problem with the newsletter format as well.... frustrated.....😭 thank you! Lyn
  14. @14steve14 hi Steve, thank you very much for your reply. i never can send email or newsletter out from oscommerce backend. with or without addons, basically what hostpapa told me is that when i install oscommerce, i put the owner name and email address, oscommerce will it it "owner name" <email@mywebsite.com> which is not fit with the email format, and causing the problem, so need to change to only email@mywebsite, not "owner name" <email@mywebsite.com> if i changed, i can only send email, not Newsletter, as hostpapa told me, their services not support email attachment and newsletter format...i think it is rediculous. So i change the server and took more then a week to A2, but just now today i tried, even change email format, i can not send email out at all.... and one thing annoy me so much is that you have to register customer enable to use the email, i thought should be able to manual just copy and past email to the email column.... been use oscommerce for couple years, but feel quite frustrated, i am thinking to change to different shopping cart system that have easier function for email/newsletter and template design.... many thanks! Lyn
  15. @JcMagpieHi Zahid, Thanks for reply. I am using Hostpapa the past years, the services quality drop dramatically recent 2 years, this year UNLIMITED problems.... I was told that my account was mark as SPAM because of PHPIDS send the alarm Eamils to ourselves(that is why I did not like to mention my websites anywhere cause I always having lots of PHPIDS even the level setup not high...) I just wonder with newsletter at admin, it always showing the GIF file, don't close it while file sending but then have a red text line said been sent, it is just so confusing.....i have message on header setup that show if email or newsletter been sent or not, it always show sent but if i check my email account even spam or just mail, never receive it. However I did receive email when osCommerce set up confirmation email and when PHPIDS send report, but not from admin at all (to anyone)... so not sure it is Hostpapa server problem or admin problem.... gave the duplicate steps to Hostpapa and waiting for them to try and reply me back, maybe again take long time to respond....I will come back to update when i know what is going on.... Thanks! Lyn
×