Jump to content
Latest News: (loading..)

Search the Community

Showing results for tags 'app'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News and Announcements
    • News and Announcements
    • Partner Announcements
    • Ambassadors
  • Commercial Support
    • Developer Feedback
  • osCommerce Online Merchant v2.x
    • General Support
    • Installation and Configuration
    • Upgrading from Earlier Versions (v2.x to v2.x)
    • Add-Ons
    • Tips and Tricks
    • Security
  • Development
    • osCommerce Online Merchant v2.4
    • osCommerce Online Merchant Community Bootstrap Edition
    • osCommerce Online Merchant v3.x
    • Development Proposals
  • General
    • Next Steps / Optimizations / Marketing
    • Live Shop Reviews
    • E-Commerce Laws
    • General Discussions
    • PHP / SQL / Web Design
  • Club osC's Announcements
  • PayPal's Announcements
  • Sage Pay's Announcements
  • Solomono - new level osCommerce templates's Announcements
  • German Community's OSCOM v2.x
  • German Community's Allgemein
  • German Community's OSCOM v3.x

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Real Name




Found 5 results

  1. 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!
  2. Liebe Oscommerce-Gemeinde, seit ca. 3 Jahren habe ich die PayPal App "Login mit PayPal" funktionstüchtig installiert. Seit ein paar Tagen funktioniert das Teil nicht mehr vollständig. Es wurden keine Änderungen meinerseits am Shopsystem vorgenommen. Version: v2.3.4 Problembeschreibung: Wenn sich ein Kunde via "Login mit PayPal" anmeldet werden seit jüngster Zeit folgende Daten nicht mehr übertragen: Anrede, Vorname, Nachname, Geburtsdatum Im Adminbereich unter der PayPal-App/Log werden alle Daten übernommen aber eben Anrede, Vorname, Nachname, Geburtsdatum nicht an den Shop/Kundenkonto weiter gegeben. Hat noch jemand das Problem? Oder an was könnte das liegen? Gruß, Frank
  3. tgely

    Facebook APP

    Hi all, I have started figure out Facebook Login and put into the Facebook APP interface https://github.com/Gergely/facebook-app Any proposal appreciated. Testers wanted. Facebook Login enable to log in with facebook account and create a social account in the shop. FBLogin registrate the user with origin facebook email address. Thanks
  4. Hi, On my development site which is 2.3.4 I have the paypal app installed and activated, although I have never added any live or sandbox credentials to it. During an upgrade to the site it has been seen that there are 100's of duplicate entries in the database. (actually around 1000) Could someone who is using the app please have a look at their database configuration table and check for duplicates of entries beginning with: OSCOM_APP_PAYPAL Many Thanks
  5. The new paypal app introduces a new admin/orders.php file if like me you had modified the original file to incorporate changes, then these changes will be lost on installing the new file. the purpose of this thread is to allow people to share the changes they find are needed to re-instate these mods in the new files bundled with the paypal app.