Jump to content

mr_absinthe

Members
  • Posts

    41
  • Joined

  • Last visited

Contact Methods

Profile Information

  • First Name
    Alex
  • Last Name
    Spirov

Recent Profile Visitors

1,417 profile views

mr_absinthe's Achievements

Enthusiast

Enthusiast (6/14)

  • Reacting Well Rare
  • Dedicated Rare
  • First Post Rare
  • Collaborator Rare
  • Week One Done Rare

Recent Badges

19

Reputation

  1. Not clear what is the point of having module when you can just sign for ultra cheap and fast CDN such as bunnyCDN and all your images and static files are served from their worldwide network.
  2. There is nothing more to explain, the above information in my posts should be quite self-explanatory, you can also have a look here.
  3. Do you really mean that turning off marketing cookie will disable Add to Cart??? Do not post misleading information and educate yourself please! I hope that the below helps: Off Site Targeting: Marketing and Personalisation Targeted cookies are linked to services provided by our trusted partners. These cookies are placed by our trusted advertising and marketing partners (including social networks). These help us to build an understanding of your interests (for example by understanding what products you have browsed on our site) and show you products, services and advertisements relevant to you. These cookies make it possible for us to ensure that you don’t see irrelevant, duplicate or multiple ads from us in a short period of time. We do want to prevent ads continuously re-appearing and annoying you. You can turn these cookies off. However, you will still see random non targeted advertisements from us online and on social media. These ads will be less relevant, and you may see more adverts. You will also continue to receive a personalised experience on this website and (if you are subscribed) in our Email Marketing. Onsite Targeting: Marketing and Personalisation These cookies are placed by our company and are used to help us to build an understanding of your interests (for example by understanding what products you have browsed on our site) and show you products, services and advertisements relevant to you whilst you are on the Next Website. These cookies make it possible for us to personalise your experience on this website and (if you are subscribed) in our Email Marketing.
  4. Your module is no longer valid as displaying a simple message is simply not enough. You must block the cookie installation until the user gives his consent. User must be able to select which cookies will be accepted. According to the latest privacy laws, the cookie consent must work as on the example below:
  5. I figured that out but would be better to modify by module instead of hard coding AdminController.php file. BTW the code has changed in 1.7.8.8 /** @var int Auth cookie lifetime */ const AUTH_COOKIE_LIFETIME = 3600;
  6. Lucky you, I can start my PC in 10 sec but certainly not restore a complete shop and database!
  7. My hosting company wouldn't even allow me to run PHP 5.6 so you should maybe think about changing your host. I wonder how much would it cost to recover and rebuild your shop after it's been hacked...🤔 PHP 5.6 support ended in December 2018, no security patches for years, I wouldn't sleep if I had my store running on such historic PHP version. I'm sure that you'll not be able to run this module but I might be wrong (sure I'm not 😁).
  8. I think that there might be an elegant solution without a script... Let's assume that we want to schedule the cron job to run on every Saturday at 6am with the interval of 21 days. 0 6 * * 6 lr=./lastrun; [ "`find $lr -mtime -21`" ] || { touch $lr; /path/to/real/job; } Assuming that . (the home directory) is writable. The find will report the file if less than 21 days old, then nothing is done. Otherwise the file is refreshed and the job is done.
  9. It would be great if we could run the cron job in specific times that are not possible to set using standard cron job settings, ie. every three weeks on Thursday. There are some examples but a wrapper script is required which is currently beyond my knowledge I'm afraid. 🤔
  10. That was it, missing backticks, thanks a lot, now it is working as expected, here's the complete file if anyone needs it <?php require_once('./config/config.inc.php'); header('Content-Type: text/plain'); echo "Today is " . date('l jS \of F Y h:i:s A') . "\n\n"; function runSql($description, $sql) { echo "$description: "; $conn = Db::getInstance(); try { $conn->execute($sql); $error = $conn->getMsgError(); if ($error) { echo "Failed\nError: " . $conn->getMsgError() . "\n"; } else { echo "Success [updated " . $conn->Affected_Rows() . " records]\n"; } } catch (Exception $e) { echo "Failed\nError: " . $e->getMessage() . "\n"; } } //set special offer from today for 7 days, 20% off runSql("Update Specific Price for Visitors", "UPDATE "._DB_PREFIX_."specific_price SET reduction = '0.200000', reduction_type = 'percentage' , `from` = '".date('Y-m-d H:i:s')."', `to` = '".date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s').' +7 day'))."' WHERE id_specific_price = 18"); runSql("Update Specific Price for Guests", "UPDATE "._DB_PREFIX_."specific_price SET reduction = '0.200000', reduction_type = 'percentage' , `from` = '".date('Y-m-d H:i:s')."', `to` = '".date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s').' +7 day'))."' WHERE id_specific_price = 28"); runSql("Update Specific Price for Customers", "UPDATE "._DB_PREFIX_."specific_price SET reduction = '0.200000', reduction_type = 'percentage' , `from` = '".date('Y-m-d H:i:s')."', `to` = '".date('Y-m-d H:i:s', strtotime(date('Y-m-d H:i:s').' +7 day'))."' WHERE id_specific_price = 29"); ?> It is quite self-explanatory, the specific price must exist hence the id_specific_price.
  11. It is all I can see on the screen when I call the file in browser.
  12. It may be obvious to you or to someone who is knowledgeable in coding but not to me I'm afraid. If it was, I wouldn't be posting questions here but answers. Anyway, there still seems to be a problem: Using PHP version: 7.4.33 and 10.6.12-MariaDB if that makes any difference.
  13. @joseantgv here it is: <?php require_once('./config/config.inc.php'); header('Content-Type: text/plain'); echo "Today is " . date('l jS \of F Y h:i:s A') . "\n\n"; function runSql($description, $sql) { echo "$description: "; $conn = Db::getInstance(); try { $conn->execute($sql); $error = $conn->getMsgError(); if ($error) { echo "Failed\nError: " . $conn->getMsgError() . "\n"; } else { echo "Success [updated " . $conn->Affected_Rows() . " records]\n"; } } catch (Exception $e) { echo "Failed\nError: " . $e->getMessage() . "\n"; } } runSql("Update Specific Price", "UPDATE "._DB_PREFIX_."specific_price SET reduction = '0.180000', reduction_type = 'percentage' , `from` = 'NOW()', to = 'DATE_ADD(NOW(), INTERVAL 7 DAY)' WHERE id_specific_price = 18"); ?> What I see as an advantage of the above is that it updates id_specific_price column thus not changing id_shop_group and if needed, we can update more products or customer groups at once by duplicating the runSgl.
×
×
  • Create New...