Jump to content
Latest News: (loading..)


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by tgely

  1. Change to POST button procedure against GET to fill out shopping cart to prevent robot activity. If robots can not access the cart then you wont have headache. I use it for ages without any problem in huge number of shops althought I proposed it in 2014 witout any core result... so I have deleted it from github.
  2. Hi all, should be the part of v2.4 email templates or not? checkout example: https://github.com/tgely/osCommerce-234-bootstrap/tree/cleaned_email_templates
  3. tgely

    HTML emails?

  4. Well mostly Preparing [Paypal Standard] status means that the checkout was canceled by the customer. Do you have incomes in PP account? If yes then may be call back url was missed or orders_id destroyed in orders_status_history data table. Check you PP incomes and orders_status_history table if are there any rows with null orders_id. This issue could be happen by admin side too when admin edit orders. This could be a session regeneration problem at admin side.
  5. Cookie setting logs. Cookieless email pixel, total cookie consent php managment by visitors, pdf data policy files with history and full opt-in GDPR consent for HTML forms, plus 3 party apps switch by users in live v2.3.4 style and BS client's stores. Automatic session or cookie usage in functional modules. Admin select between global HT EU cookie and self mod content cookie consent module. Opt-in consent ask when new cookie dependent module installed...

    Welcome Jean "Cloude Drunker's" alcoholic cookies in osc life!

    Next face to GLS App.

  6. Hi everybody, Mailchimp is a good way going forward but the latest api v3.0 is not figured out for oscommerce. I have done it for my business but no more time to build an app at this moment. Setup Enviroment Download from github the latest api: https://github.com/drewm/mailchimp-api Upload MailChimp.php and Batch.php from zip archive into YOUR_CATALOG/ext/api/mailchimp3/ folder. Install ht_mailchimp_360.php header tag for constants or edit by directly list_id and api in the code below. Create test.php file with build in class and test script codes for oscommerce enviroment in YOUR_CATALOG/ext/api/mailchimp3/ folder. <?php // see result in Mailchimp account API menu or use mailchimp class file logger // https://us2.admin.mailchimp.com/account/api/ chdir('../../../'); // ini_set('display_errors', 1); // Prepaires // do oscommerce setup require('ext/api/mailchimp3/MailChimp.php'); use DrewM\MailChimp; require('includes/application_top.php'); class OSCOM_MailChimp { private $_api; private $list_id; private $logfile = 'mailchimp.log'; private $logger_enabled = true; public function __construct() { $api_key = MODULE_HEADER_TAGS_MAILCHIMP_360_API_KEY; $this->list_id = MAILCHIMP_LIST_ID; $this->_api = new DrewM\MailChimp\MailChimp($api_key); } public function subscribe($email, $merge_fields = array()) { $subscriber_hash = $this->_api->subscriberHash($email); $this->_api->get("lists/" . $this->list_id . "/members/" . $subscriber_hash . ""); $response = $this->_api->getLastResponse(); if ($response['headers']['http_code'] == 404) { // add new user $result = $this->_api->post("lists/" . $this->list_id . "/members", [ 'email_address' => $email, 'status' => 'subscribed', 'merge_fields' => $merge_fields ]); } else { // modify user $this->_api->patch("lists/" . $this->list_id . "/members/" . $subscriber_hash . "", [ 'status' => 'subscribed' ]); } if ($this->logger_enabled) { $this->logger($this->_api->getLastError()); $this->logger($result); $this->logger($this->_api->getLastResponse()); $this->logger($this->_api->getLastRequest()); } } public function unsubscribe($email) { $subscriber_hash = $this->_api->subscriberHash($email); $this->_api->get("lists/" . $this->list_id . "/members/" . $subscriber_hash . ""); $response = $this->_api->getLastResponse(); if ($response['headers']['http_code'] == 200) { // modify user $this->_api->patch("lists/" . $this->list_id . "/members/" . $subscriber_hash . "", [ 'status' => 'unsubscribed' ]); if ($this->logger_enabled) { $this->logger($this->_api->getLastError()); $this->logger($result); $this->logger($this->_api->getLastResponse()); $this->logger($this->_api->getLastRequest()); } } } public function getListId() { return $this->list_id; } public function setListId($list_id) { $this->list_id = $list_id; } private function logger($msg) { file_put_contents($this->logfile, date("Y-m-d H:i:s") . " | " . print_r($msg, true) . "\n", FILE_APPEND); } } /* EXAMPLE CODE */ // use ?up (subscribe) or ?down (unsubscribe) params in URL request for testing $M = new OSCOM_MailChimp(); $merge_array = array('FNAME'=> 'Elek', 'LNAME'=> 'Test'); if (isset($_GET['up'])) { $M->subscribe('test.elek@freemail.hu', $merge_array); } elseif (isset($_GET['down'])) { $M->unsubscribe('test.elek@freemail.hu'); } require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Usage: http://YOUR_CATALOG/ext/api/mailchimp3/ test.php?up or http://YOUR_CATALOG/ext/api/mailchimp3/ test.php?down Webhook unsubscribe example codes for oscommerce: <?php /* Configuring Webhooks Webhooks are configured from your MailChimp account. Here are the basic steps: Log in to your MailChimp account Navigate to your Lists Click View Lists on the list you want to configure Click the List Tools menu option at the top Click Webhooks Configuration is simple: Enter a valid url for us to contact, then select the events and event sources (see below for descriptions) you want to have sent to you. */ chdir('../../../'); require('includes/application_top.php'); if (isset($_POST['type'])) { $customers_email = (isset($_POST['data']['email']) ? tep_db_prepare_input($_POST['data']['email']) : Null); if (tep_validate_email($customers_email)) { $check_query = tep_db_query("select customers_id from customers where customers_email_address = '" . tep_db_input($customers_email) . "'"); if (tep_db_num_rows($check_query)) { $customers = tep_db_fetch_array($check_query); if ($_POST['type'] == 'subscribe') { tep_db_query("update customers set customers_newsletter = '1' where customers_email_address = '" . tep_db_input($customers_email) . "'"); } elseif ($_POST['type'] == 'unsubscribe') { tep_db_query("update customers set customers_newsletter = '0' where customers_email_address = '" . tep_db_input($customers_email) . "'"); } tep_db_query("update customers_info set customers_info_date_account_last_modified = now() where customers_info_id = '" . (int)$customers['customers_id'] . "'"); } } } $my_key = 'your_secret_code!'; wh_log('==================[ Incoming Request ]=================='); wh_log("Full _REQUEST dump:\n".print_r($_REQUEST,true)); if ( !isset($_GET['key']) ){ wh_log('No security key specified, ignoring request'); } elseif ($_GET['key'] != $my_key) { wh_log('Security key specified, but not correct:'); wh_log("\t".'Wanted: "'.$my_key.'", but received "'.$_GET['key'].'"'); } else { //process the request wh_log('Processing a "'.$_POST['type'].'" request...'); switch($_POST['type']){ case 'subscribe' : subscribe($_POST['data']); break; case 'unsubscribe': unsubscribe($_POST['data']); break; case 'cleaned' : cleaned($_POST['data']); break; case 'upemail' : upemail($_POST['data']); break; case 'profile' : profile($_POST['data']); break; default: wh_log('Request type "'.$_POST['type'].'" unknown, ignoring.'); } } wh_log('Finished processing request.'); /*********************************************** Helper Functions ***********************************************/ function wh_log($msg){ $logfile = 'webhook.log'; file_put_contents($logfile,date("Y-m-d H:i:s")." | ".$msg."\n",FILE_APPEND); } function subscribe($data){ wh_log($data['email'] . ' just subscribed!'); } function unsubscribe($data){ wh_log($data['email'] . ' just unsubscribed!'); } function cleaned($data){ wh_log($data['email'] . ' was cleaned from your list!'); } function upemail($data){ wh_log($data['old_email'] . ' changed their email address to '. $data['new_email']. '!'); } function profile($data){ wh_log($data['email'] . ' updated their profile!'); } require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> Hooks examle or direct oscommerce snipet code in create_account.php: //Mailchimp if (MODULE_HEADER_TAGS_MAILCHIMP_360_STATUS == 'True') { if ($newsletter == '1') { require_once('includes/classes/OSCOM_mailchimp.php'); $M = new OSCOM_MailChimp(); $merge_array = array('FNAME'=> $firstname, 'LNAME'=> $lastname ); $M->subscribe($email_address, $merge_array); } } Note: OSCOM_mailchimp.php contains only the same class code as you use in test.php use your own risk. Have a good work!
  7. Hi all, my Extended Search Bar pushed out for BS stores. http://oscom.hu/images/store_search/store_search_bootstrap_oscommerce.png Add-On : http://addons.oscommerce.com/info/9328 If products are found more than 5 result then advanced search link appears in dropdown as 6th line. If product is not found then advanced search link is displaying in dropdown. Exception: typed single "b" or "B" has no effect. Store Search field working as an origin Search bar with typed enter/return or click on button. Search in description configuration mode has effect only as origin Search method. File content searches are only in "OR" conditions. Categories and product results are working by "AND" conditions.
  8. Super Simple code: <a href="https://paypal.me/myaddress/<?= $order->info['currency'] . preg_replace("/[^0-9.,]/", '', $order->info['total']); ?>" target="_blank"><?= BUTTON_PAYPAL_ME; ?></a> Language dependencies: define('BUTTON_PAYPAL_ME', 'Pay with Paypal <i class="fa fa-paypal" aria-hidden="true"></i>'); Text email SS PP code: echo 'https://paypal.me/myaddress/' . $order['currency'] . $orders_total['ot_total']['value'] . ' (Pay with PayPal.me)'; myaddress= https://paypal.me/grab :D
  9. I dont understand this function. Why do you use it? If you want to disable all cookies the HTML post method enable it by the new managment mode. https://github.com/Gergely/oscommerce_ce/blob/a8838c9532dc9227a7f694df935badf2ab8d78ca/includes/classes/osc_template.php#L204-L211
  10. I've collected informative personal data sources which sould be managed in data privacy policy document. Registration Newsletter (optional) Orders Url web log (IP address and behaviour) Action recorder (IP address and email address) Contact emails Returns with bank account numbers
  11. @azpro what is php version? Strict cookies could be extend in modal template with a foreach function. What opt-out function is? @wHiTeHaT I dont see the installed/non installed on/off modules problem in your code example. oscTemplate class could handle all modules, not only the ht_ modules. For example google tag manager code implemented under the <body> tag and core be able to use content module with php cookie. I dont mind that you are extend or edit this code example. This could be a real function of github. I dislike programing in posts.
  12. @azpro Thank you for testing. Yes with this solution the core will be slover. (more function more time) I can not do more service with timeless running. osc_template is the most closest solution at this moment regards to template modules. If we use separated class then we have to reopen all installed modules again so this was non-logic step which was skipped. I tried to do my best with speed optimatization so you can see this code change now. $_expiration declaration could be cause troubles but I dont know what system do you use. Could you post here the system report result? System report: https://yourdomain/youradmin/server_info.php?action=export
  13. Dinamyc document managments has a risk that somebody can owerwrite it which is danger. If shop GDPR rules will be changed then you have to ensure the static safety content day by day. And by this way you can do notifications if need. PDF format is developed for it.
  14. One intresting rule I have found that GDPR versions need list by version dates so this rule requires a document managment. The best way could be a static page with html links
  15. One tip I see in practice. Cookie usage information page is implemented on a cookiless domain. This could be a subdomain place
  16. The informastion text will be changed to something like this:
  17. https://apps.oscommerce.com/FbzeO&europe-confidentialities-cookie-law
  18. Is not served into CE version the cookie consent ht module? https://cookieconsent.insites.com/ Its surprised me
  19. the forum motor is intresting ... There are not need accept popup. Only need a cookie information popup line with links to GDPR and cookie usage If I know this is an exist module at this moment. Only text information need edit
  20. Cookie Consent for CE BS version: https://github.com/Gergely/oscommerce_ce/compare/cookie_consent
  21. Consent Cookies Managment are testing now so this could be used later in the official core. I have tried as close as possible to oscTemplate class and later this could be pull into oscTemplate. What core changes need? Cookie sensitive modules need a built in public array variable where defined the cookie consent group and apply the settings from oscConsent cookie and module have to use cookie managment logic oscTemplate class rebuild for cookie managments (next step now I use cooki_consent separated class) The best would be one footer modal module for user settings or cookie consent managment user page. Introduce oscConsent cookie All modules could listing on consent setting page as Strict, Functional and 3.parties when cookie consent group variable is declared in self class body Functional cookies in generally from javascripts or 3. parties cookies deleted automatically when user switch off them so this will be GDPR complaint. If you have non cookie consent logic follow modules then you could change it later as developer implements this logic but this is not a big work. I will push cookie consent introduce commit at this weekend and we will be able to discuss oscTemplate implementations on next week.
  22. https://github.com/Gergely/oscommerce2-addons/compare/cPath_validation
  23. @Gyakutsuki Let me more time to demonstrate something and we could compare the solutions.