Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 06/26/2019 in all areas

  1. 2 points
    if it is intentional as you say then that is a real shame. Text search/replace across multiple files has been available before the existence of osCommerce, it's a staple of most IDE's where you can define a project folder. Unfortunately we'll have to disagree on the "little, if any, benefit", table prefix functionality is common/standard with pretty much every script (WordPress for example). Unless you're happy to have a separate database for every script you install, table naming conflicts are common and the chances of it happening increase with the amount of tables installed per script, that's where prefixes come into play. Ripping functionality out for the sake of convenience is regression, not progression. I'd hope the table and filename definitions are still loaded at least even if not utilised. I'm starting to understand why HPDL hasn't recognised it when it's pulled away from basic coding standards. Even HPDL's OSC V3 based on MVC architecture uses definitions, albeit in a more modern way. Most modern frameworks use definitions for this purpose in some shape or form. osC has to compete with other carts that are available, make itself as flexible as possible from the ground up and not become a niche hardcoded personal project. I'm sorry to say it but there's not much future in that.
  2. 1 point
    Hi, I've had an opportunity today to start having a look around the code (I wanted to start contributing to it at some point) and noticed that there are a lot (if not all) hardcoded table and filenames. Is this intentional or something on the to-do list to change back to defined constants? If it's intentional it seems like a step backwards/devolution to me. This question may have come up before but does anyone know the thinking/reason behind this? I'm trying to get my head around it. It will make table prefixes and changing filenames so difficult in the future, changing something that gave it flexibility to something inflexible.
  3. 1 point
    Run's fine but your zip file has old code which needs updating. Also this add-on is only usable if you have only one image per product and all images are in one dir..
  4. 1 point
    peterbuzzin

    Module import/export

    Personally I think it's a nice idea. If you're just looking after one store, probably your own then you wouldn't have much need for it. My employer has nearly a 800 clients and nearly 2000 hosted sites. We try to save time by reusing as much previous work/code as possible to make us more efficient. We also have live/production and staging/development areas where we may duplicate sites and place them for additional development without affecting the service of the live site/store. At the moment after testing, I'd either have to copy rows using Navicat from the DB and paste in the live DB or install the module and manually enter the details again into the live store/site. This would be a nice feature. I might add it to my to-do list Smoky!
  5. 1 point
    Hi @valquiria23 Been too busy to get around to uploading the contrib. For the time being, swap out your admin/missing_pics.php file with this one and see if that works for you. - Andrea missing_pics.php
  6. 1 point
    Update Behind the scenes I've been working on this for supercheaphobb to find out what the cause is. After a lot of investigation today we have found the issue and been able to introduce a solution without much change to the code. This issue is present in every install of the Frozen 2.3.4.1 Fork (straight out of the box) and stores will need to make this change in order to use Login with PayPal (now called Connect with PayPal) or any other similar oAuth/token authorisation service such as Login with Google or Facebook. A some point a decision was made to move script from top of login.php and place it amongst the code of includes/modules/content/login/cm_login_form.php. This would have been fine if that code was only intended for the login form but it's intended to be shared amongst and used by any other modules/content/login/***.php modules that need to (i.e. Login with PayPal). This code was originally designed to execute if $login_customer_id was set and more than zero (that was all it needed), but in cm_login_form.php it's been buried within other conditional statements so it will only execute if the traditional login form has been completed and a user/pass match has been found another reason why this code will always fail when using other authentication methods. Full thanks and credit go to supercheaphobb for his sponsorship of this solution. The original script previously located in login.php is //from login.php (originally) if ( is_int($login_customer_id) && ($login_customer_id > 0) ) { if (SESSION_RECREATE == 'True') { tep_session_recreate(); } $customer_info_query = tep_db_query("select c.customers_firstname, c.customers_default_address_id, ab.entry_country_id, ab.entry_zone_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " ab on (c.customers_id = ab.customers_id and c.customers_default_address_id = ab.address_book_id) where c.customers_id = '" . (int)$login_customer_id . "'"); $customer_info = tep_db_fetch_array($customer_info_query); $customer_id = $login_customer_id; tep_session_register('customer_id'); $customer_default_address_id = $customer_info['customers_default_address_id']; tep_session_register('customer_default_address_id'); $customer_first_name = $customer_info['customers_firstname']; tep_session_register('customer_first_name'); $customer_country_id = $customer_info['entry_country_id']; tep_session_register('customer_country_id'); $customer_zone_id = $customer_info['entry_zone_id']; tep_session_register('customer_zone_id'); tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1, password_reset_key = null, password_reset_date = null where customers_info_id = '" . (int)$customer_id . "'"); // reset session token $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); // restore cart contents $cart->restore_contents(); if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); tep_redirect($origin_href); } tep_redirect(tep_href_link('index.php')); } And has now been moved to includes/modules/content/login/cm_login_form.php at approximately line 61. There are two possible fixes for this and you can choose whichever will best suit your current/future needs. 1: Relocate/move the code back to login.php (but make sure you remove it from cm_login_form.php) or 2: Move the code outside of the conditionals (if statements) that surround it in cm_login_form.php If you choose option 2, you'll need to ensure that you give Login with PayPal a lower sort value in Admin > Modules > Content than the sort value of Login Form as the Login with PayPal code needs to execute before Login Form (as it would have originally before Frozen). So if Login Form has a sort value of 100, give Login with PayPal a sort value of 50. Option 2 Fix below Select the following code on line 61 //from login.php if ( is_int($login_customer_id) && ($login_customer_id > 0) ) { if (SESSION_RECREATE == 'True') { tep_session_recreate(); } $customer_info_query = tep_db_query("select c.customers_firstname, c.customers_default_address_id, ab.entry_country_id, ab.entry_zone_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_ADDRESS_BOOK . " ab on (c.customers_id = ab.customers_id and c.customers_default_address_id = ab.address_book_id) where c.customers_id = '" . (int)$login_customer_id . "'"); $customer_info = tep_db_fetch_array($customer_info_query); $customer_id = $login_customer_id; tep_session_register('customer_id'); $customer_default_address_id = $customer_info['customers_default_address_id']; tep_session_register('customer_default_address_id'); $customer_first_name = $customer_info['customers_firstname']; tep_session_register('customer_first_name'); $customer_country_id = $customer_info['entry_country_id']; tep_session_register('customer_country_id'); $customer_zone_id = $customer_info['entry_zone_id']; tep_session_register('customer_zone_id'); tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1, password_reset_key = null, password_reset_date = null where customers_info_id = '" . (int)$customer_id . "'"); // reset session token $sessiontoken = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand()); // restore cart contents $cart->restore_contents(); if (sizeof($navigation->snapshot) > 0) { $origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']); $navigation->clear_snapshot(); tep_redirect($origin_href); } tep_redirect(tep_href_link('index.php')); } Cut and paste it on what will then be approx line 65, the line immediately after the closing/right curly brace/bracket and above the line of code starting with if($error == true){ } //PASTE THE CODE HERE if ($error == true) { $messageStack->add('login', MODULE_CONTENT_LOGIN_TEXT_LOGIN_ERROR); } @burt you might want to patch/fix this, if not in frozen then in the Edge version.
  7. 1 point
  8. 1 point
    Available classes Use a single or combination of the available classes for toggling content across viewport breakpoints. Extra small devicesPhones (<768px) Small devicesTablets (≥768px) Medium devicesDesktops (≥992px) Large devicesDesktops (≥1200px) .visible-xs-* Visible Hidden Hidden Hidden .visible-sm-* Hidden Visible Hidden Hidden .visible-md-* Hidden Hidden Visible Hidden .visible-lg-* Hidden Hidden Hidden Visible .hidden-xs Hidden Visible Visible Visible .hidden-sm Visible Hidden Visible Visible .hidden-md Visible Visible Hidden Visible .hidden-lg Visible Visible Visible Hidden so just add hidden-xs to the end to hide on extra small devices, you can add as many hiden-* as you need https://getbootstrap.com/docs/3.4/css/#responsive-utilities e.g. <div class="col-sm-<?php echo $content_width; ?> cm-i-new-products hidden-xs hidden-sm">
  9. 1 point
    Thank You, @ArtcoInc - that was it! Feeling foolish after being 'wise' enough to correct some other hard-coded entries before testing it. Thanks very much for taking the time to look it over - I appreciate it! @valquiria23 - how does one update an existing contribution? This one is probably a decade old, but very useful. - Andrea
×