Jump to content

Gyakutsuki

♥Ambassador
  • Content count

    726
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by Gyakutsuki

  1. Gyakutsuki

    Mailchimp newsletter Everywhere add on

    yes, you must see subscribe success message, do you see in mailchimp your subscription Enable the debug and go to the console to see the message.
  2. Gyakutsuki

    Mailchimp newsletter Everywhere add on

    Oups, bad born !!! Change, Tk Rainer
  3. Gyakutsuki

    Mailchimp newsletter Everywhere add on

    Try le latest (1.8) but this is a simple add on and I haven't compatibility problem.
  4. Gyakutsuki

    Mailchimp newsletter Everywhere add on

    hello, Mailchimp based on api v3. Some people ask to create a topic about this contribution The v 1.8 change a little bit, disable the contribution and copy the files and enable ! Tk to @@raiwa for this comment. link to the addon : http://addons.oscommerce.com/info/9289
  5. Gyakutsuki

    Mailchimp newsletter Everywhere add on

    sorry don't understand, no relation
  6. Gyakutsuki

    Mailchimp newsletter Everywhere add on

    you can use the second, It seems to be at 100% yes add a col-sm-xx (xx is a number between and 12) for exemple : <div class="col-sm-8 ContentText footer_mailchimp">
  7. Gyakutsuki

    Mailchimp newsletter Everywhere add on

    you have a problem with this : <script data-rocketsrc="ext/api/mailchimp_v3/mailchimp_v3.js" type="text/rocketscript"> </script> and must to be <script src="ext/api/mailchimp_v3/mailchimp_v3.j"> </script> please activate the debug, I can see the result
  8. Gyakutsuki

    Mailchimp newsletter Everywhere add on

    You must to update the html content in function your needs In includes/modules/content/footer/template you find this : maybe not updated for BS <div class="clearfix"></div> <div class="ContentText footer_mailchimp"> <div class="row col-md-12"> <div class="col-md-3"></div> <div class="col-md-2"><h4><?php echo MODULE_FOOTER_MAILCHIMP_TEXT; ?></h4></div> <div class="col-md-3"> <?php echo $form; if (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS)) { echo tep_draw_input_field('lastname', NULL, 'class="form-control" required aria-required="true" required="" id="lname" placeholder="' . ENTRY_LAST_NAME . '"'); echo tep_draw_input_field('firstname', NULL, 'class="form-control" required aria-required="true" required="" id="fname" placeholder="' . ENTRY_FIRST_NAME . '"'); echo tep_draw_input_field('email', NULL, 'required id="email" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email'); echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, 'success','id="SendButton','xs') } elseif (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS)) { echo tep_draw_input_field('email', NULL, 'required id="email" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email'); echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, 'success','id="SendButton','xs') . tep_draw_hidden_field('anonymous', 'anonymous'); } echo $endform; ?> </div> <div><span class="message" id="message"><span></div> </div> </div> try this : <div class="clearfix"></div> <div class="ContentText footer_mailchimp"> <div><h4><?php echo MODULE_FOOTER_MAILCHIMP_TEXT; ?></h4></div> <?php echo $form; if (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_CUSTOMERS)) { echo tep_draw_input_field('lastname', NULL, 'class="form-control" required aria-required="true" required="" id="lname" placeholder="' . ENTRY_LAST_NAME . '"') . ' '; echo tep_draw_input_field('firstname', NULL, 'class="form-control" required aria-required="true" required="" id="fname" placeholder="' . ENTRY_FIRST_NAME . '"'). ' '; echo tep_draw_input_field('email', NULL, 'required id="email" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email'). ' '; echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, 'success','id="SendButton','xs'). ' '; } elseif (!empty(MODULES_HEADER_TAGS_MAILCHIMP_LIST_ANONYMOUS)) { echo tep_draw_input_field('email', NULL, 'required id="email" placeholder="' . ENTRY_EMAIL_ADDRESS . '"', 'email'). ' '; echo tep_draw_button(MODULE_FOOTER_MAILCHIMP_SUBMIT, null, null, 'success','id="SendButton','xs') . tep_draw_hidden_field('anonymous', 'anonymous'); } echo $endform; ?> <div><span class="message" id="message"><span></div> </div> </div>
  9. Gyakutsuki

    Mailchimp newsletter Everywhere add on

    You must to adjust the html page of the module to your website.
  10. It can do that. First it force the devise because it identfy the ip and your configuration. After if you display the currency box, the customer can change. Do not test exactly; I will try.
  11. Hi guy, There my code that I write, the pb this code is made for the next release 2.4 and not 2.3. I have no time to propose an update on the module than I make before. In this case, I can propose you the module for 2.4. It's very simple approach and you can update for the 2.3 easily. The approach is under hook but you can create another hook or class fir 2.3. It's your choice. To introduce the code, you need : Update the hook for 2.3 (call jus below) Update this function : getJsonCustomerData() about the cache Update the install db for 2.3 approach. change OSCOM::GetIpAddress() by the appropriate function osc 2.3 (tep_get_ip_address()) That's all I think. insertl the hook at the bottom of application_top.php (of course updated for 2.3) Registry::get('Hooks')->call('AllShop', 'CurrenciesGeolocalisation'); Hook system. class CurrenciesGeolocalisation { protected $spider_flag; public function __construct() { global $spider_flag; $this->UrlAPISSL = "https://ssl.geoplugin.net/json.gp?ip="; $this->SSLKey = CONFIGURATION_CURRENCIES_GEOLOCALISATION_SSLKEY; $this->UrlAPI = 'http://www.geoplugin.net/json.gp?ip='; $this->spiderFlag = $spider_flag; $this->ipCustomer = OSCOM::GetIpAddress(); } /* * indicate different informations on the customer * @[member=param] $localisation_array return an array on the localisation * @[member=access] public */ private function setUrlAPI() { if (!empty($this->SSLKey) && !is_null($this->SSLKey)) { $url = $this->UrlAPISSL . $this->ipCustomer . '&k=' . $this->SSLKey; } else { $url = $this->UrlAPI . $this->ipCustomer; } return $url; } //------------------------------------------------------ // Debug //------------------------------------------------------ /** * Display all git information inside a repository or sub directory * @[member=param] $result, repository to analyse * @[member=Return] $repo,values of array of all git information * @[member=access] public */ public function displayDataAPI() { $data = '<pre>' . print_r($this->setUrlAPI(), true) . '</pre>'; return $data; } /** * getJsonCustomerData * @[member=param] * @[member=Return] $result all data for customer identification and insert in cahce * @[member=access] private */ private function getJsonCustomerData() { $OSCOM_Cache = Registry::get('Cache'); $ip = str_replace('.', '_', $this->ipCustomer); if($OSCOM_Cache->read('geolocalisation-' . $ip, 60)) { $result = $OSCOM_Cache->getCache(); } else { $url = file_get_contents($this->setUrlAPI() ); //content of readme. $data = json_decode($url); $result = $OSCOM_Cache->write($data, 'geolocalisation-' . $ip); } return $result; } /** * getCustomerCountryCode * @[member=param] * @[member=Return] $country_code,code iso 2 of the country - FR * @[member=access] public */ public function getCustomerCountryCode() { $data = $this->getJsonCustomerData(); $country_code = $data->geoplugin_countryCode; return $country_code; } /** * getCustomerCountryName * @[member=param] * @[member=Return] $country_code, name of the country - FRANCE * @[member=access] public */ public function getCustomerCountryName() { $data = $this->getJsonCustomerData(); $country_code = $data->geoplugin_countryName; return $country_code; } /** * getCustomerRegionCode * @[member=param] * @[member=Return] $region_code, region of the country name - Jura * @[member=access] public */ public function getCustomerRegionCode() { $data = $this->getJsonCustomerData(); $region_code = $data->geoplugin_regionCode; return $region_code; } /** * getCustomerRegionName * @[member=param] * @[member=Return] $region, baem of region of the country name - Jura * @[member=access] public */ public function getCustomerRegionName() { $data = $this->getJsonCustomerData(); $region = $data->geoplugin_regionName; return $region; } /** * getCustomerContinent * @[member=param] * @[member=Return] $continent, conteninent of the country - NA / EU / AS ... * @[member=access] public */ public function getCustomerContinent() { $data = $this->getJsonCustomerData(); $continent = $data->geoplugin_continentCode; return $continent; } /* * Currency in function the localisation * @[member=param] $new_currency return the currency in function the localisation * @[member=access] public * osc_get_currencies_location */ public function GetCurrenciesLocation() { $country_code2 = $this->getCustomerCountryCode(); if ($this->getCustomerContinent() == 'NA') { if ($country_code2 == 'CA') { if (DEFAULT_CURRENCY != 'CAD') { $new_currency = 'CAD'; } else { $new_currency = DEFAULT_CURRENCY; } } elseif ($country_code2 == 'US') { if (DEFAULT_CURRENCY != 'USD') { $new_currency = 'USD'; } else { $new_currency = DEFAULT_CURRENCY; } } else { $new_currency = DEFAULT_CURRENCY; } } elseif ($this->getCustomerContinent() == 'EU') { if ($country_code2 == 'EU') { if (DEFAULT_CURRENCY != 'EUR') { $new_currency = 'EUR'; } else { $new_currency = DEFAULT_CURRENCY; } } else { $new_currency = DEFAULT_CURRENCY; } } else { $new_currency = DEFAULT_CURRENCY; } return $new_currency; } /* * Define currency in function the localisation * @[member=param] * @[member=Return] : false is nothing else return the currency * @[member=access] public * osc_get_currencies_location */ private function getCurrenciesByGeolocalization() { if (CONFIGURATION_CURRENCIES_GEOLOCALISATION == 'true') { $currencies_by_geolocalization = $this->GetCurrenciesLocation(); } else { $currencies_by_geolocalization = false; } return $currencies_by_geolocalization ; } /* * Install db if does'nt exist * @[member=param] * @[member=access] private * */ private function install() { $OSCOM_Db = Registry::get('Db'); $OSCOM_Language = Registry::get('Language'); if ($OSCOM_Language->getID() == 1) { $OSCOM_Db->save('configuration', [ 'configuration_title' => 'Souhaitez-vous afficher une devise automatique par défaut en fonction du continent ?', 'configuration_key' => 'CONFIGURATION_CURRENCIES_GEOLOCALISATION', 'configuration_value' => 'false', 'configuration_description' => 'En fonction de la provenance du client et de son continent, le tarif du produit prend par défaut la devise du continent du client.<br /><br /><u><strong>Note :</strong></u><br />- Les devises par défaut implémentées sont : USD, EUR, CAD <br />- Si le client provient d\'un autre continent, ce sera la devise par défaut qui s\'affichera.<br />- L\'ajustement automatique des devises en fonction de la langue ne fonctionne pas dans ce cas.<br />L\'analyse de l\'addresseIP du client est faite à partir de ce site : http://geoplugin.net.<br'>http://geoplugin.net.<br />Veuillez lire leurs instructions.<br /><br /><i>(Valeur True = Oui - Valeur False = Non)</i>', 'configuration_group_id' => '1', 'sort_order' => '9', 'set_function' => 'osc_cfg_set_boolean_value(array(\'true\', \'false\'))', 'date_added' => 'now()' ] ); $OSCOM_Db->save('configuration', [ 'configuration_title' => 'Souhaitez-vous indiquer la clef pour une certification SSL de géolocalisation en fonction de la devise automatique continent (non obligatoire) ?', 'configuration_key' => 'CONFIGURATION_CURRENCIES_GEOLOCALISATION_SSLKEY', 'configuration_value' => '', 'configuration_description' => 'Le site http://geoplugin.net peut vous fournir une clef qui vous permettra d\avoir une connexion sécurisée. Veuillez vous y référer pour plus d\'informations</i>', 'configuration_group_id' => '1', 'sort_order' => '9', 'set_function' => '', 'date_added' => 'now()' ] ); } else { $OSCOM_Db->save('configuration', [ 'configuration_title' => 'Do you want display an automatic default currency by continent ?', 'configuration_key' => 'CONFIGURATION_CURRENCIES_GEOLOCALISATION', 'configuration_value' => 'false', 'configuration_description' => 'Depending on the source of the client and the continent, the price is updated in function the customer continent.<br /><br /><u><strong>Note :</strong></u><br />- The default currency implemented are: USD, EUR, CAD <br />- If the customer comes from another continent, it will be the default currency that is displayed.<br />- The automatic adjustment of currencies depending the language does not work in this case.', 'configuration_group_id' => '1', 'sort_order' => '9', 'set_function' => 'osc_cfg_set_boolean_value(array(\'true\', \'false\'))', 'date_added' => 'now()' ] ); $OSCOM_Db->save('configuration', [ 'configuration_title' => 'Do you want insert a Key for SSL certification for your automatic currencies by continent (no mandatory) ?', 'configuration_key' => 'CONFIGURATION_CURRENCIES_GEOLOCALISATION_SSLKEY', 'configuration_value' => '', 'configuration_description' => 'The website http://geoplugin.net can propose you a SSL key for a secure connexion. Please go on website and see their documentation', 'configuration_group_id' => '1', 'sort_order' => '9', 'set_function' => '', 'date_added' => 'now()' ] ); } } public function execute() { if (!defined(CONFIGURATION_CURRENCIES_GEOLOCALISATION) == true || CONFIGURATION_CURRENCIES_GEOLOCALISATION == null || empty(CONFIGURATION_CURRENCIES_GEOLOCALISATION)) { $this->install(); } if ($this->spiderFlag === false) { if ($this->getCurrenciesByGeolocalization() != false) { $_SESSION['currency'] = $this->getCurrenciesByGeolocalization(); } return $_SESSION['currency']; } } }
  12. Gyakutsuki

    Automatic Currency adjustment by continent

    No it doesn' work because the site is down.
  13. A new contribution with a web service who adjust automaticly the currencies in function the country. If you default currency is CAD and your configuration has EUR, then the customer come from Europe see automaticly the EUR By default : All Europe : EUR North America : USD (United States) and CAD (Canada) Default : your default currency you can use the webservice until 100 000 resquest by day Let me know your experience. http://addons.oscommerce.com/info/8571
  14. before PHP7 /msql7, I haven't been this problem. strict mode could a way. ok, your idea seems to work. var_dump(htmlentities(EMAIL_FROM)) = mon service <test@[member=test].fr> Tk.
  15. Hello, I don't know if you have this pb but I have a pb with php7 and mysql 7 with email For example in admin EMAIL_FROM = test<test@[member=test].com> var_dump(EMAIL_FROM) = test between <> it's removed. It's not good, because the email does'nt work, newsletter also. It's affect all variable use email like this. Also when you import your sql data this element between <> is removed. Do you identified this problem ?
  16. It's simple : in newsletter you have this element : EMAIL_FROM come from Db and EMAIL_FROM has value test<test@@test.com> if you write this code : var_dump(EMAIL_FROM) the result is : test Above I tried different configuration and I write the result.
  17. @@MrPhil Yes I tried this, doesn't work The problem is important because you change this element since administration. mon service \<test@[member=test].fr\> newsletter.php:36: string(37) "mon service \" mon service <test@[member=test].fr> newsletter.php:36: string(35) "mon service " Ok with that test@[member=test].fr newsletter.php:36: string(21) "test@[member=test].fr"
  18. Ok, if you don'tl tel me the files I don't search everytime. I think your problem become in my opinion on the transfert value, I have some problem with that and that's why you need to use $_SESSION['coupon']. Go back on the page I sent you above and try to follow the debug and test every time if you see all the values. checkout_payment discount class checkout confirmation order_total checkout process
  19. it appears with string(6) "erika2" at the top of the confirmation page... does that help? Seems the value is created. Try to test in order_total directory, discount_coupon.php if you see the calcul of the coupon by a var_dump($this->output); If you don't see the coupon line or not the calcul, it seems the $coupon does'nt pass, and it's better to use $_SESSION. It can be a pb with php version.
  20. it breaks it, normal, you need to see an information about $_SESSION['coupon']. If you see you coupon, it's ok, if not, pb. try to reinstall de contribution with a software like beyond compare. It's important to the value else in checkout confirmation you won't see the information.
  21. could you look in order class if you have $_SESSION['coupon'] if yes write this var_dump($_SESSION['coupon']) exit; and test
  22. your problem is the coupon value. It does'nt sent I think.
  23. look this : http://forums.oscommerce.com/topic/213019-contribution-discount-coupon-codes/page-171
  24. @GLWalker There 2 examples : One to execute a function, one to display something Also if a hook exist you can extend with another hook. Advantage no intervention in the code and in orignal hook but for not the best solution (depends of the situation) Hook with call (not display) $OSCOM_Hooks->call('Orders', 'ActionDeleteConfirm'); <?php namespace OSC\OM\Module\Hooks\Admin\Orders; use OSC\OM\OSCOM; use OSC\Sites\Admin\OrderAdmin; class ActionDeleteConfirm { public function __construct() { if (OSCOM::getSite() != 'Admin') { OSCOM::redirect('index.php'); } $this->restock = $_POST['restock']; $this->oID = (int)$_GET['oID']; } private function redirect() { OSCOM::redirect('admin/orders.php', osc_get_all_get_params(array('oID', 'action')), 'AUTO'); } public function execute() { OrderAdmin::removeOrder($this->oID, $this->restock); $this->redirect(); } } Hook with with display (very simple) Registry::get('Hooks')->call('AllShop', 'FirstTime'); <?php namespace OSC\OM\Module\Hooks\Shop\AllShop; class FirstTime { public function execute() { echo TEXT_INSTALL; echo ' <div class="text-md-center;"><br /><a href="http://www.mysite.org/" target="_blank"><img src="images/logo.png" border="0" height="100" width="100" alt="Site"><br />Go to Site</a></div>'; echo ' <div class="text-md-center" style="font-size: 10px;padding-top:10px;">blabla <a href="http://www.mysite.com" target="_blank">mysite</a>.</div>'; } }
×