Jump to content

Demitry

Members
  • Content count

    511
  • Joined

  • Last visited

  • Days Won

    23

Everything posted by Demitry

  1. Demitry

    DDOS on shared servers

    I just found out that they force SSL on all pages, which is not a big deal for me as long as it doesn't impact page loading speed,.. though it's not the way osCommerce is set up. And, this is the first time I am using cloud hosting. I was with WebHostingHub for over 7 years, which is a sister company to InMotion hosting. They were good in the beginning, but their performance and QoS dropped off dramatically in recent times. I'm also impressed with HostArmada's tech support. It seems like it's a bunch of Bulgarians, but their English is great, so is their response time, and knowledge base. WebHostingHub's tech-support QoS deterioration is one of the main reasons I chose to look for another hosting company.
  2. Demitry

    DDOS on shared servers

    I just got their Speed Reaper 3-year plan on November 30th. I did a bunch of research before landing on this company. So far, everything is great! One thing to mention, their server date/time stamp is set to the European format, as in dd/mm/yyyy. That threw me off because I am used to the US format of mm/dd/yyyy. So, when it says that your next billing date is 04/12/2024, it's not April 12th. Also, their shared hosting is not ideal for certain types of customers. For example, if your site is dependant on heavy file downloads such as videos, their shared hosting would not be a good fit for both, storage and data transfer.
  3. Demitry

    DDOS on shared servers

    Also, if you don't already, you should use Up-Time Robot. It's a free service that pings your site every 5 minutes and sends you an email or text to let you know when your site is down and again when it comes back up.
  4. Demitry

    DDOS on shared servers

    Check out HostArmada. They boast about their security and specifically DDoS attacks. Their Speed Reaper plan is a good one. Their renewal rates suck, but the first 3-yr discount is great. Plus, I cannot find any bad reviews for them. Though no dedicated IP for shared. Another one to concider is ScalaHosting. They have a VPS at $10/month with a 3-year commitment. Great reputation on this one too.
  5. Demitry

    Addons for orders.php

    Ok, I was wondering why that addslashes() function was there, and now we know. I'm glad it worked for you. Cheers!
  6. Demitry

    Addons for orders.php

    I just realized that the query I posted may fail. Please replace the following in that SQL query: $order->products[$i]['products_model']) with this: $order->products[$i]['model'])
  7. Demitry

    Addons for orders.php

    Give this a try. This is based on the product model. Though I have not tested it, and the attributes FOR loop follows this code. Uncomment that print_r(); statement to see if this works based on the quantity of how many products you have of that model. $order_count_query = tep_db_query("select p.products_quantity, p.products_model, pd.products_name from products_description pd, products p, orders_products op where p.products_id = pd.products_id and pd.products_name = '" . addslashes($order->products[$i]['name']) . "' and p.products_model = ' . $order->products[$i]['products_model']) . ' and op.orders_id = '" . $_GET['oID'] . "'"); $order_count = tep_db_fetch_array($order_count_query); echo ' ' . $order_count['products_quantity'] . ' in-stock'; //print_r(' There are ' . $order_count['products_quantity'] . ' in-stock of model: ' . $order_count['products_model']);
  8. Demitry

    Fake accounts

    reCAPTCHA uses minimal JavaScript and though any script can be bypassed, it is one of the most challenging to get around. Although version 2 does require user input, it's now considered a standard for protecting online forms, which makes it not so much of a "bother." More so, reCAPTCHA version 3 works in the background and doesn't require user interaction. It's the invisible reCAPTCHA. It is a Google owned product and therefore, has dedicated resources. https://www.google.com/recaptcha/about/
  9. Demitry

    Fake accounts

    If these are bot generated, just add a reCAPTCHA along with the honey pot.
  10. I looked at the source code and at the first image on the page. This is the src link: https://lh4.googleusercontent.com/zgqDvFRBbP_xFVpk5W66YfY4AakWg8qOsFzLq0P0Pl7f5PZ3zOd_obki2d_43KCTixeun_6bRP0cKZqjAxl-ddWZIZzYfnJu57kqYdYxtBozb4i4arbS9LVO-6M5Nz2RHA=w1280 Though you didn't really need me to point out the problems with that link, did you?
  11. Demitry

    Country State Selector BS v3.0

    @cannuck1964 What version of osC are you using? And, did you just install this add-on, or was it there from some time back and just stopped working? I have BS Edge and the default code for the country/state pairing was problematic. I actually worked on this Country State Selector add-on, but for reasons I cannot recall now, I chose a different one. I installed Rainer's State Selector BS add-on and World Zones. https://apps. oscommerce.com/cbtGB&state-selector-bs
  12. Demitry

    Country State Selector BS v3.0

    give this a try: window.addEventListener('DOMContentLoaded', function() { if ($("#inputCountry").val() == "") { $("#inputCountry").val("223"); } if ($("#inputCountry").val() != "") { $("label[for='inputState']+div").html(), (id_country = $("#inputCountry").val()), (sn = $("#inputState").val()), $.post("states.php", { country_id:id_country, state_name:sn }, function (a) { $("label[for='inputState']+div").html(a); }); } });
  13. Demitry

    Need some JS/jQuery help

    Hi, I’m finishing up an update to a Multi-Vendor Shipping (MVS) addon feature, and have encountered a situation that I am having a difficult time resolving. The problem is with my JS/jQuery skills. A while back, I made a Purchase Order feature that can be saved as a PDF file and sent to the vendor via email from the same page. While updating this page and its features, I came across an issue where the text that wraps inside of a textbox/textarea element, but does not wrap when rendered via a PDF file. I found a number of solutions to wrap this text for those fields in the PDF, but cannot seem to make any of these solutions work with my current jQuery code for generating the PDF file. The screenshot image below shows how the admin Vendor Purchase Order page looks. Within this page, there are 4 fields that I need to allow for text wrapping. The product name (when it’s a long one), the Vendor Instructions (not visible when no instructions are listed via the vendor profile), the customer’s comments from the order (not visible if no comments are made at the time of purchase), and the additional order comments (last-minute store-owner comments added before generating the PDF – these are not saved anywhere in osC, only to the generated PDF file). I could probably use the wordwrap() function via PHP for the first three fields (because the data for these are extracted from the database), but not for the last one. That additional order comments textarea should be jQuery. Here is the code I have to generate the PDF: <script src="https://unpkg.com/jspdf@latest/dist/jspdf.umd.min.js"></script> <script src="https://unpkg.com/html2canvas@1.3.2/dist/html2canvas.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.min.js"></script> and in the body: <script> $(document).ready(function() { $(".btn_genPDF").click(function() { var element = document.getElementById("pdf-Content"); html2pdf(element, { margin: <?php echo $js_margin; ?>, // margin in pixels when jsPDF units set to 'pt' = best page-centering filename: '<?php echo $filename; ?>', image: { type:'jpeg', quality:0.98 }, // default quality setting is 0.95 html2canvas: { scale:3, dpi:192, logging:true, letterRendering:true, position:0 }, // scale: 1 to 5, where 1 is default and lowest quality setting pagebreak: { mode:'avoid-all', before:'#po_page_break' }, jsPDF: { unit:'pt', format:'letter', orientation:'<?php echo $js_orientation; ?>' } }) }); }); </script> It seems that using the jQuery splitTextToSize() function is the valid way to wrap text inside an element, but I could really use some help with how to integrate that function with the current code that generates the PDF file. Any help would be greatly appreciated.
  14. Read through that thread. It seems that Gmail spam filters are blocking the subject line.
  15. Just wrap that in... if (is_array($customers_dob) && isset($customers_dob)) { ..... } Try it without the is_array() function.
  16. Try this for the first one. switch (isset($_GET['install'])) { or switch ((isset($_GET['install']) ? $_GET['install'] : null)) {
  17. if (is_array($group_id_array) && sizeof($group_id_array <= 1)) { Should really be... if (is_array($group_id_array) && sizeof($group_id_array) <= 1) {
  18. 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.
  19. 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!
  20. 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?
  21. 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.
  22. 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.
  23. 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.
  24. 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.
  25. 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?
×