Jump to content

Smoky Barnable

♥Ambassador
  • Content count

    100
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Smoky Barnable

  1. Any serious shop owner should really just learn PHP. It really isn't difficult and quite empowering. You should never have any fear of changing the core. Putting yourself in a position to be reliant on a developer is rather foolish in my opinion.
  2. Smoky Barnable

    Paypal Express No shipping charge

    Today I notice all my customers checking out using the PayPal Express method are not being charged shipping. Anyone else having this problem today?
  3. Smoky Barnable

    Stripe v3 module for SCA

    I do get the occasional duplicate payment, but it's quite rare.
  4. Smoky Barnable

    Paypal Express No shipping charge

    Never mind. I'm pretty certain the USPS API is suffering intermittent service outages today. So, no charge when the API times out and no shipping quote is retrieved. https://www.shippingapimonitor.com/history.html?api=usps
  5. Smoky Barnable

    Stripe v3 module for SCA

    Thinking of the idea of subscriptions/recurring billing as an option using the stripe api. Could perhaps be worked into this add-on. Thoughts? https://stripe.com/docs/billing/subscriptions/overview
  6. Smoky Barnable

    PayPal App for osCommerce Online Merchant

    GoDaddy possibly blocking IP's? https://www.paypal.com/us/smarthelp/article/what-are-the-ip-addresses-for-live-paypal-servers-ts1056
  7. Very nice! I think I will try to apply this to the reviews.php page. Always bothered me the old reviews always showed on the first page.
  8. Smoky Barnable

    Stripe v3 module for SCA

    I think this was caused by a network communication/timeout error since it only happened once in thousands of orders, so I'm not too concerned with it. On another note, I was quite pleased when looking in my admin total revenue box that my sales had increased dramatically over the last few months. However it seemed too high....I realized today that the total revenue is not being reported correctly because it's treating orders with a status of Preparing [Stripe SCA] as completed purchases. These are customers that have not completed payment but are being counted as sales in the total revenue module. As a temporary solution, I patched the query to ignore orders with a status of "Preparing [Stripe SCA]". I also changed this in all code that generates sales reports. I don't know if there is a better solution, but this really skewed my perception of how my business was performing the last few months and as such is quite an important issue in my opinion. I do understand that this can be avoided by manually deleting incomplete orders but I don't consider this a viable solution. Moderator Comment Discussions regarding Order status split to the following thread as requested by Rainer.
  9. Smoky Barnable

    Stripe v3 module for SCA

    Just had a strange issue. I received an order email, but when checking the admin there was no order. Stripe logs show the payment failed because "The PaymentIntent requires a payment method." I checked customer account and there are no items in the cart. Customer received order confirmation email but payment was not processed and order not created. View counter monitor logs show the following: checkout_success.php action=update 1 Sun, 1st 22:30:21 -> checkout_success.php 2 Sun, 1st 22:30:12 -> account_history.php 1 Sun, 1st 22:30:01 -> checkout_process.php 1 Sun, 1st 22:29:30 -> checkout_confirmation.php 1 Sun, 1st 22:24:55 -> checkout_payment.php 1 Sun, 1st 22:24:30
  10. Smoky Barnable

    Emails not sending

    You might consider using a transactional email service. Hosts are becoming much more restrictive by filtering/blocking emails to protect shared server reputation.
  11. I thought this was a support thread for JcM Header/Footer message Add-on. What's up with all the irrelevant posts?
  12. Smoky Barnable

    Stripe v3 module for SCA

    Turns out they don't support the Brave browser. Only the browsers listed here will function properly. https://stripe.com/docs/js/appendix/supported_browsers It would be nice to display a message to customers that aren't using a supported browser.
  13. Smoky Barnable

    Stripe v3 module for SCA

    I've had a few customers report payment problems when using the Brave browser. Not sure how popular that browser is, but thought I would mention it. Customers say after they enter their credit card number, the input box turns gray and the number disappears. Nothing happens upon submission. Checking Stripes logs it states payment method not selected.
  14. Is there any way to add search suggest functionality to this great add-on? Autocomplete helps but I still see customers misspelling words and they can't find what they are looking for.
  15. I have an occasional shipping address formatting problem where the shipping address is not written to the database correctly. For example, the customer street address is Dürrenberger Straße 8 but is written to the database as Dürrenberger StraÃe 8. Any thoughts?
  16. Wow!...a Fanny album, nice. Thanks for this module. Great idea. 😀
  17. 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! ☸️
  18. 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?
  19. 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.
  20. Yes, I see italic text and the entire navbar background is red. https://www.lifewire.com/how-to-clear-cache-2617980
  21. /* 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; }
  22. 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; } }
  23. Smoky Barnable

    PayPal App timing out?

    How does the PayPal App connect to the PayPal servers? In other words, I notice occasionally the connection times out on the shopping cart page and the express payment button is not displayed. Same issue if using PayPal login, none of the login methods load if a connection to PayPal can't be established. Does the PayPal App cycle through all ip/domain addresses as described here? https://www.paypal.com/us/smarthelp/article/what-are-the-ip-addresses-for-live-paypal-servers-ts1056 The long timeouts are the concern to me. Perhaps something more robust can be coded up.
  24. Smoky Barnable

    PayPal App v5.018 Log In with PayPal is now dead

    Thanks for this fix, it works for me. I notice when the login box pops up the background redirects to homepage.
  25. Smoky Barnable

    PayPal App for osCommerce Online Merchant

    The Login with PayPal function no longer works. It currently returns an Invalid authorization code error when a customer attempts to login using their PayPal credentials. On the developer site it states: It's called "connect with paypal" now and I notice the login button looks different.
×