Jump to content

Smoky Barnable

♥Ambassador
  • Content count

    84
  • Joined

  • Last visited

  • Days Won

    1

Smoky Barnable last won the day on September 4 2016

Smoky Barnable had the most liked content!

Profile Information

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Smoky Barnable

    Stripe v3 module for SCA

    I have been using this on two production sites with no problems. Thanks to @asro2004 for a great module! One of my sites has a modified checkout process page so I had to make those changes in the stripe_sca class after_process function. Also the delete buttons in the customer account area are a bit jumbled if more than one card is saved. A <br> fixed that for me. Cheers! ☸️
  2. Smoky Barnable

    Stripe v3 module for SCA

    I notice if the confirm order button is submitted with an invalid card number, a row is written to the orders table in the database with Preparing [Stripe SCA] status. Is this intended?
  3. Smoky Barnable

    Stripe v3 module for SCA

    Try updating/changing your modules.php from the frozen release. I had the same problem on my older edge site.
  4. I've been seeing a lot of these fake accounts this week as well. I use cloudflare cdn firewall to challenge the countries they are coming from....Hungary, Latvia etc. It's working quite well. I refuse to inconvenience my customers with a captcha.
  5. Yes, I see italic text and the entire navbar background is red. https://www.lifewire.com/how-to-clear-cache-2617980
  6. Perhaps try a clean installation without the sample products/categories and see if you have the same issue.
  7. /* user.css ----------------------------------------------------------------- */ .navbar, .navbar-brand, .nb-brand, .cm-navbar { font-style:italic !important; background-color:red; } or for the entire navbar to be red: /* user.css ----------------------------------------------------------------- */ .navbar, .navbar-brand, .nb-brand, .cm-navbar { font-style:italic; background-color:red !important; }
  8. Smoky Barnable

    Optional Related Products, Version 4.0

    Hello @Rwe, I've updated this to BS4. Can you please look at this code to see if it is valid? I'm still learning how to convert BS3 to BS4. Thanks! <?php /* $Id: cm_pi_related_products.php $Loc: catalog/includes/modules/content/product_info/ Related Products 6.3 BS by @raiwa info@oscaddons.com www.oscaddons.com Copyright (c) 2016 osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Released under the GNU General Public License */ class cm_pi_related_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_PRODUCT_INFO_RELATED_PRODUCTS_TITLE; $this->description = MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_DESCRIPTION; if ( defined('MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_STATUS') ) { $this->sort_order = MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SORT_ORDER; $this->enabled = (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_STATUS == 'True'); } } function execute() { global $oscTemplate, $languages_id, $currencies, $currency, $PHP_SELF, $product_info; $content_width = MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_CONTENT_WIDTH; $product_width = MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_DISPLAY_EACH; $optional_rel_prods_content = NULL; $orderBy = 'order by '; $orderBy .= (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_RANDOMIZE == 'True')?'rand()':'pop_order_id, pop_id'; $orderBy .= (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_MAX_DISP > 0)?' limit ' . MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_MAX_DISP:''; $optional_rel_prods = "SELECT "; $specials_query = ''; if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_QUANTITY == 'True') $optional_rel_prods .= "products_quantity, "; if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_MODEL == 'True') $optional_rel_prods .= "products_model, "; if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_THUMBS == 'True') $optional_rel_prods .= "products_image, "; if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_PRICE == 'True') { $optional_rel_prods .= "products_tax_class_id, products_price, IF(s.status, s.specials_new_products_price, NULL) as specials_products_price, "; $specials_query = " left join specials s on s.products_id = pb.products_id "; } if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_NAME == 'True') $optional_rel_prods .= "products_name, "; if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_DESCRIPTION == 'True') $optional_rel_prods .= "substring_index(pa.products_description, ' ', " . MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_DESCRIPTION_LENGTH . ") as products_description, "; $optional_rel_prods .= "pop_products_id_slave "; $optional_rel_prods .= "from products_related_products, products pb left join products_description pa on pa.products_id = pb.products_id " . $specials_query . " where pop_products_id_slave = pa.products_id and pa.products_id = pb.products_id and language_id = '" . (int)$languages_id . "' and pop_products_id_master = '" . (int)$_GET['products_id'] . "' and products_status='1' " . $orderBy; ///echo $optional_rel_prods; $optional_rel_prods_query = tep_db_query($optional_rel_prods); if (tep_db_num_rows($optional_rel_prods_query) > 0) { $optional_rel_prods_content .= '<h3>' . MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_TITLE . '</h3>'; $optional_rel_prods_content .= '<div class="row"><div class="card-deck mx-auto">'; while ($optional_rel_prods_values = tep_db_fetch_array($optional_rel_prods_query)) { if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_QUANTITY == 'True') $products_qty_slave = '<span itemprop="inventoryLevel">' . $optional_rel_prods_values['products_quantity'] . '</span>'; $optional_rel_prods_content .= ' <div class="card" itemprop="isRelatedTo" itemscope itemtype="http://schema.org/Product">'; $optional_rel_prods_content .= ' <meta itemprop="url" content="' . tep_href_link('product_info.php', 'products_id=' . $optional_rel_prods_values['pop_products_id_slave']) . '" />'; switch (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_HEIGHT_MODE) { case 'Equal Height': $optional_rel_prods_content .= ' <div class="card-body text-center">'; break; case 'Fixed Height': $optional_rel_prods_content .= ' <div class="card" style = "height:' . MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_HEIGHT_VALUE . 'em;">'; break; case 'None': $optional_rel_prods_content .= ' <div class="card">'; break; } // show thumb image if Enabled if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_THUMBS == 'True') { $optional_rel_prods_content .= '<a href="' . tep_href_link('product_info.php', 'products_id=' . $optional_rel_prods_values['pop_products_id_slave']) . '">' . tep_image('images/' . $optional_rel_prods_values['products_image'], $optional_rel_prods_values['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>'; } $optional_rel_prods_content .= ' <div class="caption">'; if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_NAME == 'True') { $optional_rel_prods_content .= '<p class="text-center"><a href="' . tep_href_link('product_info.php', 'products_id=' . $optional_rel_prods_values['pop_products_id_slave']) . '"><span itemprop="name">' . $this->tep_truncate_text_rel_prod($optional_rel_prods_values['products_name'], MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_NAME_LENGTH, MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_MAX_WORD_LENGTH) . '</span></a></p>'; } if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_MODEL == 'True') { $optional_rel_prods_content .= '<p class="text-center small" itemprop="model">' . $optional_rel_prods_values['products_model'] . '</p>'; } //$optional_rel_prods_content .= '<hr>'; if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_DESCRIPTION == 'True') { $optional_rel_prods_content .= '<p class="text-center"><a href="' . tep_href_link('product_info.php', 'products_id=' . $optional_rel_prods_values['pop_products_id_slave']) . '"><span itemprop="description">' . $this->tep_truncate_text_rel_prod(strip_tags($optional_rel_prods_values['products_description']), MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_DESCRIPTION_LENGTH, MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_MAX_WORD_LENGTH) . '</span></a><br>'; } if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_PRICE == 'True') { $optional_rel_prods_content .= '<p class="text-center" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><meta itemprop="priceCurrency" content="' . tep_output_string($currency) . '">'; if (tep_not_null($optional_rel_prods_values['specials_products_price'])) { $optional_rel_prods_content .= '<del>' . $currencies->display_price($optional_rel_prods_values['products_price'], tep_get_tax_rate($optional_rel_prods_values['products_tax_class_id'])) . '</del>&nbsp;'; $optional_rel_prods_content .= '<span class="productSpecialPrice" itemprop="price" content="' . $currencies->display_raw($optional_rel_prods_values['specials_products_price'], tep_get_tax_rate($optional_rel_prods_values['products_tax_class_id'])) . '">' . $currencies->display_price($optional_rel_prods_values['specials_products_price'], tep_get_tax_rate($optional_rel_prods_values['products_tax_class_id'])) . '</span><br>'; } else { $optional_rel_prods_content .= '<span itemprop="price" content="' . $currencies->display_raw($optional_rel_prods_values['products_price'], tep_get_tax_rate($optional_rel_prods_values['products_tax_class_id'])) . '">' . $currencies->display_price($optional_rel_prods_values['products_price'], tep_get_tax_rate($optional_rel_prods_values['products_tax_class_id'])) . '</span><br>'; } $optional_rel_prods_content .= '</p>'; } if (MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_QUANTITY == 'True') { $optional_rel_prods_content .= '<p class="text-center" itemprop="offers" itemscope itemtype="http://schema.org/Offer">' . sprintf(MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_QUANTITY_TEXT, $products_qty_slave) . '</p>'; } $optional_rel_prods_content .= ' </div>'; // caption $optional_rel_prods_content .= ' </div>'; // card $optional_rel_prods_content .= ' </div>'; // col' . $product_width . '" } $optional_rel_prods_content .= ' </div></div>'; } //only output template html if related poducts are found if (!empty($optional_rel_prods_content)) { ob_start(); include('includes/modules/content/' . $this->group . '/templates/related_products.php'); $template = ob_get_clean(); $oscTemplate->addContent($template, $this->group); } } function isEnabled() { return $this->enabled; } function check() { return defined('MODULE_CONTENT_PRODUCT_INFO_RELATED_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 ('Current Version', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_VERSION_INSTALLED', '6.3 BS', 'Read only.', '6', '1', 'tep_version_readonly(', 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 ('Enable Related Products Module', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_STATUS', 'True', 'Should the optional_related_products block be shown on the product info page?', '6', '2', '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 ('Uninstall Removes Database entries', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_REMOVE_DATA', 'False', 'Do you want to remove the related products database table when uninstall the module? All your existing product relations will be lost, use this option only it you are sure that you will not use related products any more.', '6', '3', '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_PRODUCT_INFO_RELATED_PRODUCTS_CONTENT_WIDTH', '12', 'What width container should the content be shown in?', '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, set_function, date_added) values ('Product Width', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_DISPLAY_EACH', '3', 'What width container should each product be shown in? (12 = full width, 6 = half width).', '6', '5', '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_PRODUCT_INFO_RELATED_PRODUCTS_SORT_ORDER', '1100', 'Sort order of display. Lowest is displayed first.', '6', '6', 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 ('Display card Image', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_THUMBS', 'True', 'Show Product Image', '6', '7', '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 ('Display Product Name', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_NAME', 'True', 'Show Product Name', '6', '8', '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, date_added) values ('Maximum of characters', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_NAME_LENGTH', '36', 'Maximum number of characters of the product name to display', '6', '14', 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 ('Display Product Model', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_MODEL', 'False', 'Show Product Model', '6', '9', '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 ('Display Product Description', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_DESCRIPTION', 'False', 'Show Product Description', '6', '9', '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, date_added) values ('Maximum Description length', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_DESCRIPTION_LENGTH', '250', 'The number of characters (to the nearest word) of the Name to display.', '6', '1', 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 ('Display Product Price', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_PRICE', 'True', 'Show Product Price', '6', '10', '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 ('Display Quantity Available', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_QUANTITY', 'False', 'Show Product Quantity', '6', '11', '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, date_added) values ('Define Number of Items to Display', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_MAX_DISP', '0', 'Maximum number of Related Products to display. 0 is unlimited.', '6', '12', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Maximum word length', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_MAX_WORD_LENGTH', '40', 'Maximum number of characters in a single word in Product Name', '6', '13', 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 ('Height mode', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_HEIGHT_MODE', 'Equal Height', 'How should the height of each product box be adjusted. \'Equal Height\' uses the Equal Height jquery script. \Fixed Height\ uses the Height specified in the next field. \'None\' adjusts the height depending on the content', '6', '15', 'tep_cfg_select_option(array(\'Equal Height\', \'Fixed Height\', \'None\'), ', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Fixed height value', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_HEIGHT_VALUE', '11', 'Fixed height for the product box in em. Has no effect for \'Equal Height\' and \'None\' mode.', '6', '16', 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 ('Use Random Display Order', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_RANDOMIZE', 'False', 'Adds random sort order to products displayed. Recommended if maximum number of products is set.', '6', '17', '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, date_added) values ('Admin Display: Maximum Rows', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MAX_ROW_LISTS_OPTIONS', '10', 'Sets the maximum number of rows to display per page.', '6', '18', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Admin Display: Drop-Down List Maximum Length', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MAX_NAME_LENGTH', '50', 'Sets the maximum length (in characters) of product name displayed in drop-down lists. Enter \'0\' to set this option to false.', '6', '19', now())"); tep_db_query("insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Admin Display: Display List Maximum Length', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MAX_DISPLAY_LENGTH', '50', 'Sets the maximum length (in characters) of product name displayed in list. Enter \'0\' to set this option to false.', '6', '20', 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 ('Admin Display: Use Product Id (PRO only)', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_USE_ID', 'False', 'Uses Product Id in lists. When Product Model or Name is also selected, Product Id is displayed first.', '6', '210', '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 ('Admin Display: Use Product Model', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_USE_MODEL', 'False', 'Uses Product Model in lists. When Product Name or Id is also selected, Product Id is displayed first.', '6', '22', '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 ('Admin Display: Use Product Name', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_USE_NAME', 'True', 'Uses Product Name in lists. When Product Model or Id is also selected, Product Id or Model is displayed first.', '6', '23', '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, date_added) values ('Admin Display: Combine Model and Name separator', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MODEL_SEPARATOR', ': ', 'Enter the characters you would like to separate ID, Model and Name, when using 2 or 3. Leave empty if only using one.', '6', '24', 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 ('Admin Display: Sort Order in Menus (PRO only)', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MENU_SORT_ORDER', 'Name', 'How should the Products be sorted in the Drop Down Menus.', '6', '25', 'tep_cfg_select_option(array(\'Name\', \'Model\', \'Id\'), ', 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 ('Admin Display: Show Out of Stock Products (PRO only)', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_INACTIVE_PRODUCTS', 'True', 'Show Out of Stock Products in the Products Drop Down Menus.', '6', '26', '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 ('Admin Function: Use Delete Confirmation', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_CONFIRM_DELETE', 'True', 'When set to True, a confirmation box will pop-up when deleting an association. Set to False to Delete without confirmation.', '6', '27', '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 ('Admin Function: Combine Insert with Inherit', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_INSERT_AND_INHERIT', 'False', 'When set to True, clicking on Inherit will also Insert the product association. When False, Inherit works as before.', '6', '28', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())"); $old_table_name = tep_db_fetch_array(tep_db_query("SHOW TABLES LIKE 'products_options_products'")); if (tep_not_null($old_table_name)) { tep_db_query("RENAME TABLE products_options_products TO products_related_products"); } tep_db_query( "create table if not exists `products_related_products` (`pop_id` int(11) not null auto_increment, `pop_products_id_master` int(11) not null default '0', `pop_products_id_slave` int(11) not null default '0', `pop_order_id` smallint(6) not null default '0', primary key (`pop_id`))"); } function remove() { if ( defined('MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_REMOVE_DATA') && MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_REMOVE_DATA == 'True' ) { tep_db_query("drop table if exists `products_related_products`"); } tep_db_query("delete from configuration where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } function keys() { return array('MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_VERSION_INSTALLED', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_STATUS', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_REMOVE_DATA', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SORT_ORDER', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_CONTENT_WIDTH', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_DISPLAY_EACH', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_THUMBS', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_NAME', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_MODEL', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_DESCRIPTION', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_DESCRIPTION_LENGTH', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_PRICE', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_SHOW_QUANTITY', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_MAX_DISP', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_MAX_WORD_LENGTH', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_NAME_LENGTH', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_HEIGHT_MODE', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_HEIGHT_VALUE', 'MODULE_CONTENT_PRODUCT_INFO_RELATED_PRODUCTS_RANDOMIZE', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MAX_ROW_LISTS_OPTIONS', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MAX_NAME_LENGTH', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MAX_DISPLAY_LENGTH', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_USE_ID', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_USE_MODEL', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_USE_NAME', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MODEL_SEPARATOR', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_MENU_SORT_ORDER', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_INACTIVE_PRODUCTS', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_CONFIRM_DELETE', 'MODULE_CONTENT_PRODUCT_INFO_ADMIN_RELATED_PRODUCTS_INSERT_AND_INHERIT' ); } protected function tep_limit_text_rel_prod ($text, $maxchar, $wordlength = 40) { $text = str_replace ("\n", ' ', $text); $text = str_replace ("\r", ' ', $text); $text = str_replace ('<br>', ' ', $text); $text = wordwrap ($text, $wordlength, ' ', true); $text = preg_replace ("/[ ]+/", ' ', $text); $text_length = strlen ($text); $text_array = explode (" ", $text); $newtext = ''; for ($array_key = 0, $length = 0; $length <= $text_length; $array_key++) { $length = strlen ($newtext) + strlen ($text_array[$array_key]) + 1; if ($length > $maxchar) break; $newtext = $newtext . ' ' . $text_array[$array_key]; } return $newtext; } protected function tep_truncate_text_rel_prod ($products_text, $maxchar, $wordlength = 40) { $products_text = ($products_text); if ($maxchar > 0) { $products_text_length = strlen ($products_text); if ($products_text_length > $maxchar) { $products_text = $this->tep_limit_text_rel_prod ($products_text, $maxchar, $wordlength); $products_text .= '&nbsp;...'; } } return $products_text; } } // End class // function show the version read only if(!function_exists('tep_version_readonly')) { function tep_version_readonly($value){ $version_text = '<br>Version ' . $value; return $version_text; } }
  9. Smoky Barnable

    Module import/export

    I suppose the idea of exporting modules is geared towards developers/coders. For example, I'm currently converting modules from BS3 to BS4. It would be nice to be able to easily export those and import into different testing environments or easily post to the apps marketplace. The key word is "easy".
  10. Smoky Barnable

    Module import/export

    No, I mean import/export of the module itself. So, for example you could export a module from one cart/domain/test environment and import it into another easily. Export would create all files needed while maintaining file hierarchy.
  11. Module import/export function would be useful in admin.
  12. Thinking about reviews today. I think it would be nice for the store owner to be able to respond to a review. Many reviews have questions or comments where a response is warranted. Also, I have had some customers expressing a wish to be able to upload photos to include with their review. Reviews are very powerful and making them more interactive/informative would be a huge plus.
  13. Smoky Barnable

    Transactional email service

    Mailchimp is great and I still use it for Newsletters, but I probably will import my mailing list into mailgun eventually to manage all emails communications in one place. As far as updating your mailchimp subscriber list I use mailchimps api to do this on create account page. // include mailchimp api for newsletter subscribers include('ext/api/mailchimp_v3/MailChimp.php'); if (isset($HTTP_POST_VARS['newsletter'])) { $newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']); //make api call to mailchimp to subscribe customer to newsletter list $merge_vars = [ 'FNAME' => $_POST['firstname'], 'LNAME' => $_POST['lastname'] ]; $MailChimp = new MailChimp('xxxxxxxxxxxxxxxxxxxx-us3'); $list_id = 'xxxxxxxx'; $result = $MailChimp->post("lists/$list_id/members", [ 'email_address' => $_POST['email_address'], 'merge_fields' => $merge_vars, 'status' => 'subscribed', ]); } else { $newsletter = false; } and account newsletter page. // include mailchimp api for newsletter subscribers include('ext/api/mailchimp_v3/MailChimp.php'); if (isset($HTTP_POST_VARS['action']) && ($HTTP_POST_VARS['action'] == 'process') && isset($HTTP_POST_VARS['formid']) && ($HTTP_POST_VARS['formid'] == $sessiontoken)) { if (isset($HTTP_POST_VARS['newsletter_general']) && is_numeric($HTTP_POST_VARS['newsletter_general'])) { $newsletter_general = tep_db_prepare_input($HTTP_POST_VARS['newsletter_general']); $newsletter = tep_db_prepare_input($HTTP_POST_VARS['newsletter']); //make api call to mailchimp to subscribe customer to newsletter list $merge_vars = [ 'FNAME' => $_POST['customers_firstname'], 'LNAME' => $_POST['customers_lastname'] ]; $MailChimp = new MailChimp(MODULES_HEADER_TAGS_MAILCHIMP_API); $list_id = 'xxxxxxxxx'; $result = $MailChimp->post("lists/$list_id/members", [ 'email_address' => $_POST['customers_email_address'], 'merge_fields' => $merge_vars, 'status' => 'subscribed', ]); } else { $newsletter_general = '0'; //make api call to mailchimp to unsubscribe customer from newsletter list $MailChimp = new MailChimp(MODULES_HEADER_TAGS_MAILCHIMP_API); $list_id = 'xxxxxxxxx'; $subscriber_hash = $MailChimp->subscriberHash($_POST['customers_email_address']); $MailChimp->delete("lists/$list_id/members/$subscriber_hash"); } if ($newsletter_general != $newsletter['customers_newsletter']) { $newsletter_general = (($newsletter['customers_newsletter'] == '1') ? '0' : '1'); tep_db_query("update " . TABLE_CUSTOMERS . " set customers_newsletter = '" . (int)$newsletter_general . "' where customers_id = '" . (int)$customer_id . "'"); } $messageStack->add_session('account', SUCCESS_NEWSLETTER_UPDATED, 'success'); tep_redirect(tep_href_link(FILENAME_ACCOUNT, '', 'SSL')); }
  14. Smoky Barnable

    Transactional email service

    I just set up Mailgun with phpmailer a few days ago and love it. Many shared hosts are using Spamexperts now to protect their server reputations, but I have found them to be much too strict.
  15. So it is impossible to checkout even though the out of stock item is still shown in your cart?
×