Jump to content

Demitry

Members
  • Content count

    519
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by Demitry

  1. Demitry

    Transfer 2.3 to 2.3.41 with fresh install

    You can use MySQL Workbench or do it through phpMyAdmin. There are other database migration tools, but these are free and will do the job for you. Just read the instructions and make sure you make a back-up of your database first.
  2. Demitry

    Add "Keep me logged in" on login page

    Ok, let me replicate this feature on one of my development sites and see if there is something I missed. You don't need a separate cron job file for the sessions table, just use Jack's Database Optimizer add-on. It cleans the entire database, not just that sessions table. And, test all your stuff on a development site/sub-domain,.. Never on your live site!
  3. Demitry

    Add "Keep me logged in" on login page

    @Jack_mcs Hey Jack, Your Database Optimizer add-on cleans that sessions table, right? Does it clean everything or only expired sessions?
  4. Demitry

    Add "Keep me logged in" on login page

    I just looked at that sessions file and I think you're right, that add-on is made for sessions that are stored in the database. I've never dealt with storing sessions in a folder instead, ..or what changes need to be made to accommodate that set-up. Let's ask Jack @Jack_mcs about the automatic removal of expired sessions from the database. I believe that this is true, but Jack would know better than I. Jack also has an awesome add-on called, Database Optimizer. This keeps your database clean and light, and you can set up a cron job to clean that database once a week or once a month. Set it to run at like 4am when most everyone is snoring so as not to impact site performance for visitors. The process only takes a minute or so,.. so it's really not a big deal.
  5. Demitry

    Add "Keep me logged in" on login page

    Actually, that sessions storage change should not make any difference as far as the session expiration control. The osC system will handle sessions regardless of where you store them. The two SQL additions via that add-on, are just there to set time controls for the sessions in admin and the catalog/shop. You could actually do the same thing by defining these session settings in the two configuration files.
  6. Demitry

    Add "Keep me logged in" on login page

    I'll take a look at this tomorrow. This should not be a problem, but I need to get some sleep right now. Talk soon.
  7. Demitry

    Add "Keep me logged in" on login page

    Ok, so there you go. Your standard session timeout is set to 24 minutes (1440/60) of inactivity. And, your server back-up sessions are stored in ea-php56. However, your actual sessions should be stored in a database table called sessions. This also tells me that you originally had your VPS set up when you were running your store on PHP 5.6. ... hence, the name of that sessions back-up temp storage folder.
  8. Demitry

    Add "Keep me logged in" on login page

    Unless you have sessions stored somewhere else, they are stored by default in the database. I'll take a look at the configuration files again. There's also a copy stored in a server folder on a shared account, that you can change to your own location. Where do you have yours stored?
  9. Demitry

    Add "Keep me logged in" on login page

    And, ..yet another option is to present the customer with a pop-up warning to let them know that their session is expiring and ask them if they want to stay logged in. I don't know if there's an add-on like this available, but it should not be a difficult one to make.
  10. Demitry

    Add "Keep me logged in" on login page

    Just a bit of a fair warning,.. if a customer is on a public computer like a library or school computer, and forgets to log out, the person who gets on that computer afterwards has full access to your customer's account. Most people aren't assholes and would likely log out the previous user. However, a scenario like that certainly presents a great opportunity to be one.
  11. Demitry

    Add "Keep me logged in" on login page

    Keep the checkbox_name unique and make sure you place the checkbox code inside the login form, ..before the closing </form> tag. The checkbox code for the login page should look something like this: <div><?php echo tep_draw_checkbox_field('keep_logged_in', '1', null, ''); ?>&nbsp;&nbsp;Keep me logged in</div> The standard session timeout is often set to 15 to 45 minutes. This setting is usually in your php.ini file. You can call your hosting company to get clarification on that setting, if you cannot find it. To test this feature, set a 1-minute session for the keep me logged in feature. If you are logged out after a minute, it's working. However, you then need to test it for the 24 hours or week session. Switching browsers doesn't transfer the session across browsers, and I am not sure if it keeps the session when you close the browser tab, but still keep the browser open. That last scenario should actually work to keep the session. I think this should work for you.
  12. Demitry

    Add "Keep me logged in" on login page

    Personally, I don't recommend doing this, but if this is what you want to do and you have not found an add-on specifically for that, then you can modify that add-on I mentioned. Just add a checkbox to the login page. Then add a conditional IF statement to the _sess_read($key) function in /catalog/includes/functions/sessions.php .. something like: If (isset($_POST['checkbox_name']) && !empty($_POST['checkbox_name'])) { ... use mod code for that function from add-on ... } else { ... use the original function ... } Then go to your admin panel and set the new session expiration control for catalog to 24 hours, a week, or whatever you want.
  13. Demitry

    Add "Keep me logged in" on login page

    Is there a reason why you want to do something like that? I mean, are you having issues with customers being logged out while they are shopping? Some of the email services have this option for people who don't want to keep logging in every time to check their email. However, this is not necessary for an eComm site and presents a security risk and related liability risk. The session timeout is usually a setting in a configuration file like php.ini. I don't know if there's an add-on for what you are looking for, and you should search that add-ons site first. If you are experiencing problems with the session being destroyed, then you need to address that problem first, before trying to modify sessions. If this is not a sessions problem and you cannot find an add-on that does what you're looking for, then you can modify the session expiration control add-on to do what you want. This is a simple add-on that allows you to set the session times for the store and the admin panel to whatever you want.
  14. Demitry

    V4 ETA ?

  15. Yeah, I totally get that. Well, then I owe you an apology for going into defense mode and writing an f-ing book of a post. I’m actually surprised that anyone read my rant. I’ve had shorter manifesto tirades before going on a shooting spree at a local Walmart. …er,.. or was it a shopping spree?, ..eh, whatever, the beer is still cold!
  16. @ArtcoInc I didn’t see that post from Vadym. I saw another one a while back and am now not sure if it was from him or second-hand. So, I was wrong in my understanding of that 2.x migration to osCv4, and you are right. Though having read this, I am now even more skeptical of the osCv4 rollout. I assume that your “Doom & Gloom” comment was directed at me. If so, I disagree with your perception of such comments. I’m a realist, ..just being realistic! 1. The last official release of this software was over 4 years old and is not compatible with today’s PHP version. 2. The software is not made to be upgradeable to newer osC versions and is not easily upgradeable to new PHP versions. 3. osC is a bare-bones set of core files that is completely dependent on addons for basic features to make it a working shop. 4. The addons site is in disarray with old and poorly coded addons most of which have not been updated in years and the majority of which are written by amateur programmers. 5. The main source of osCommerce technical support we now have is,… (drum-roll…….) => Jack! And I am very grateful for his continued commitment, availability, and help. Most of the other senior developers/techs have either jumped ship or are not wasting any more of their time on osC support. Good for them! I am grateful to them for all the time, effort, and expertise they donated to help the rest of us. 6. osC went belly-up a decade ago and there are currently around 30 people following Vadym’s “new osCommerce V4” thread who are interested in the V4 release. Numbers don’t lie! https://trends.google.com/trends/explore?date=all&amp;geo=US&amp;q=oscommerce 7. You basically have to be a programmer or know a programmer to set-up and manage an osC site. This software is not for the non-technical shop owner, which is pretty much most everyone. 8. The new osC ownership missed their own deadline for the release of the new version, which was supposed to be available this past summer of 2021. 9. That last D-bag that pretended to manage osCommerce for years, basically wiped his ass with it. And, the new osC ownership have been MIA for months. Considering all of these issues, how can you tell newbies and existing shop owners (whose old osC software is failing them), that they should stick with osCommerce? Yeah!, I tell them the truth, ..that they should go find another cart software. Why? Because it’s immoral and unethical not to. That’s not “Doom & Gloom,” ..that’s being real about the software’s current state and any future projection (seeing how the new ownership has thus far handled the osCv4 rollout). That’s me saving them a ton of time, money, and aggravation. I do believe that Vadym and his team will eventually release osCv4, which will breathe some life into this software. Though again, being realistic, ..it is highly unlikely that this new version will somehow propel osCommerce to compete with some of the big names of eComm software in the industry (or even some of the smaller ones). Ashley is just having some fun and trying to help those that still think osC is a viable eComm solution. Though your comment only proves my point. A non-technical person cannot do what Ashley (as well as Ruden) did, and that’s just patching an old software to the latest PHP version (plus a few minor tweaks). There is still the process of loading all the necessary addons, bringing them up to date, and testing them. This doesn’t even include customization. That’s like saying, “look how easy it is for that ballerina to dance on stage,” ...but try explaining that to the cops arresting you for dancing in a pink tutu on Time Square. So, that’s fairly easy stuff for someone who knows osCommerce directory, file, and code structure and is at least semi-technical (though extremely time consuming!). Not so much for the non-technical newbie or a shop owner who is still running an MS2.2 candle shop on PHP5.3.
  17. Maybe Vadym just forgot his osC login creds, and cannot figure out how to log back in. LoL
  18. Hey Malcolm, That part about updating older sites to the new version is not likely to apply to osC sites older than osCv4. Let me give this some clarity. I think there is a misunderstanding of this so called “promise” ..in that, the new version will be upgradeable to versions that follow it, and not that you will be able to take an MS2.2 shop and update it to osCv4. In theory, you could write a script for each and every deprecated feature from PHP5.2 to PHP8.0. One that seeks out each instance of such code and then replaces it with one that works on the latest PHP version. However, then you will run into issues such as the one Jack mentioned earlier in this thread, where you have more than one option for replacing a function and you have to read the code to understand which option you have to use. This would be a major coding project for the new ownership, and one that carries a HUGE risk of liability for them (even with a signed waiver),.. for live shops that end up crashing or having modules & features not working properly. My understanding of Vadym’s comment is that osCv4 will be upgradeable to all newer versions released thereafter. This makes more sense to me, in that this will resemble the WordPress model, where all core files are updated to the latest PHP version via a click of a button. Something osCommerce should have done from the very start! If this structure was implemented with osC early on, we would not be seeing threads like this one where people are running legacy PHP shops and are left with their pants down when the hosting company makes the decision to no longer support that PHP version. And on a personal note, ..what are you waiting for? You have a 5.4 and a 5.6 shop, both of which could be disabled via a hosting company’s PHP update any day now. Business disruptions and down time hurt your wallet as well as your brand. My hosting company is telling me that PHP7.3 is now considered “obsolete.”
  19. @douglaswalker You should update your PHP version asap. Otherwise, you will soon have to start from scratch with either a newer osC version or another cart software. My hosting company is now calling PHP7.3, "obsolete."
  20. from Zombie Phoenix v1.0.7.3 function tep_generate_category_path($id, $from = 'category', $categories_array = [], $index = 0) { global $languages_id; if ($from == 'product') { $categories_query = tep_db_query("SELECT categories_id FROM products_to_categories WHERE products_id = " . (int)$id); while ($categories = tep_db_fetch_array($categories_query)) { if ($categories['categories_id'] == '0') { $categories_array[$index][] = ['id' => '0', 'text' => TEXT_TOP]; } else { $category_query = tep_db_query("SELECT cd.categories_name, c.parent_id FROM categories c, categories_description cd WHERE c.categories_id = " . (int)$categories['categories_id'] . " AND c.categories_id = cd.categories_id AND cd.language_id = " . (int)$languages_id); $category = tep_db_fetch_array($category_query); $categories_array[$index][] = ['id' => $categories['categories_id'], 'text' => $category['categories_name']]; if ( (tep_not_null($category['parent_id'])) && ($category['parent_id'] != '0') ) { $categories_array = tep_generate_category_path($category['parent_id'], 'category', $categories_array, $index); } $categories_array[$index] = array_reverse($categories_array[$index]); } $index++; } } elseif ($from == 'category') { $category_query = tep_db_query("SELECT cd.categories_name, c.parent_id FROM categories c, categories_description cd WHERE c.categories_id = " . (int)$id . " AND c.categories_id = cd.categories_id AND cd.language_id = " . (int)$languages_id); $category = tep_db_fetch_array($category_query); $categories_array[$index][] = ['id' => $id, 'text' => $category['categories_name']]; if ( (tep_not_null($category['parent_id'])) && ($category['parent_id'] != '0') ) { $categories_array = tep_generate_category_path($category['parent_id'], 'category', $categories_array, $index); } } return $categories_array; }
  21. I think this is what you're looking for. <a href="' . tep_href_link('product_info.php', 'products_id=' . $random_product['products_id'] . '&review=review') . '">' . ......
  22. You need to use an "&" to add review=review instead of a "?" The question mark follows the filename and precedes the parameters. Your first parameter is the product id, that means each additional parameter is added with a "&" sign. And, if you are linking to a specific review for that product, you need to use the review id instead of review=review.
  23. I'm still not really sure what you're trying to do or how the session id is causing a problem for passing parameters to another page. .. And, whether this is an internal or external link? You can try hiding the session id via an htaccess RewriteRule script. Or, you could use a page anchor instead. If you want the user to click a link on the product info page so that they are taken to the reviews section, you can use an anchor. If you want that user to land on a specific review and let's say it's on a different page, you pass url parameters for that product's id and the review id.
  24. Parameters can be passed via PHP through a link or a form. The value of the parameter being passed must be defined in the url using the "=" sign. You can pass multiple parameters separating them with the "&" sign. The url you used as an example does not pass a value for Oscid. It's not quite the same as assigning a value to a PHP variable.
  25. Demitry

    New management and osCommerce v4

    Enough with the complaining. This thread has now turned into grief counseling. Instead, ask yourself what can you do to better the situation? ..solutions rather than criticism and grievances. A couple of folks took initiative to patch older versions of osC in order to help less than a hand-full of others who are in desperate need to upgrade their failing old osC software. I look at this as a temporary solution while we all wait for the “next season of Breaking Bad” to be released. Truth is, this software is dead and has been for a long time. Just look at this thread on osCv4. There are 30 people following it. If you didn’t get that, read that last sentence again! And just to lower your expectations a bit more, ..if and when the new version is released, it is likely to be buggy and missing some key features. Though, those issues will probably be resolved in the following release. Confucius say, “Man who want pretty nurse, ..must be patient.”
×