Francisco Carlão Posted September 24, 2010 Share Posted September 24, 2010 Hi, ive seen alot of problems with the birthdaypresent module. Im going to try to explain the problems i had and the solutionsdon't forget in the mail folder to have your language folder for the emails , in lats resort for testing just copy the english or french folder and make a new one for your language in my case i copy the en folder and created a pt (portugal) with the files from the en.1- the cron jobs the most easy way its just to goto your cpanel and the cron job its quite easy to configureexample: fetch -q http://*yourdomain*/*shopfolder*/modules/birthdaypresent/*thescript* please take notice that the words with ** are suppose to be change by your infothis example runs in quite mode.2- Scripts and solutionsthe easy part is done now ill try to explain the changes ive done.i was having errors the first for the testing and i was force to create a new user everytime i made a test so i made this change to always be able to run the cron with successes several times without creating new users.cron.php line 9 : original: if (Configuration::get('BIRTHDAY_DATE_UPD') == date('Y-m-d')) changed if (Configuration::get('BIRTHDAY_DATE_UPD') > date('Y-m-d')) Ive replace the == for the > so that during this day i can make the tests i want to users with todays birthday, this should be changed after all tests are doneafter this i was having another problem: the mail and the vouchers only appeared for one client , for what i could read in the code this append because it was only providing the vouchers to clients with orders, so i made a change in the birthdaypresent.phpline 97original $users = Db::getInstance()->ExecuteS(' SELECT DISTINCT c.id_customer, firstname, lastname, email FROM '._DB_PREFIX_.'customer c LEFT JOIN '._DB_PREFIX_.'orders o ON c.id_customer = o.id_customer WHERE o.valid = 1 AND c.birthday LIKE \'%'.date('-m-d').'\''); changed: $users = Db::getInstance()->ExecuteS(' SELECT DISTINCT c.id_customer, firstname, lastname, email FROM '._DB_PREFIX_.'customer c WHERE c.birthday LIKE \'%'.date('-m-d').'\''); i forced the database to get all users with the birthday today.YOUR DONE !!!!!!!!!!!3- other configurationsline:109 birthdaypresent.php $voucher->name = 'birthday';// here you can change the vouchernameline:110 birthdaypresent.php $voucher->description[Configuration::get('PS_LANG_DEFAULT')] = $this->l('Your birthday present !'); // here you can change the messageline:117 birthdaypresent.php $voucher->date_to = (date('Y') + 1).date('-m-d'); // here you can set the time value for the vocher Link to comment Share on other sites More sharing options...
rocky Posted September 25, 2010 Share Posted September 25, 2010 Topic renamed - please don't write in caps Link to comment Share on other sites More sharing options...
need4speed Posted November 29, 2010 Share Posted November 29, 2010 I can sure see its a old topic. But you actually helped me getting a test birthday mail. Thats awesome Is it possible to add the vochur code to the e-mail so they dont need to login before they can use it? Link to comment Share on other sites More sharing options...
frosticek Posted January 6, 2011 Share Posted January 6, 2011 Great, it is working for my problem. Do you also have fix to avoid creating vouchers to not active users ??? Link to comment Share on other sites More sharing options...
rocky Posted January 7, 2011 Share Posted January 7, 2011 Try changing the code from: $users = Db::getInstance()->ExecuteS(' SELECT DISTINCT c.id_customer, firstname, lastname, email FROM '._DB_PREFIX_.'customer c WHERE c.birthday LIKE \'%'.date('-m-d').'\''); to: $users = Db::getInstance()->ExecuteS(' SELECT DISTINCT c.id_customer, firstname, lastname, email FROM '._DB_PREFIX_.'customer c WHERE c.birthday LIKE \'%'.date('-m-d').'\' AND c.`active` = 1'); Link to comment Share on other sites More sharing options...
frosticek Posted January 7, 2011 Share Posted January 7, 2011 Working great ! Thanks Link to comment Share on other sites More sharing options...
marlo Posted January 26, 2011 Share Posted January 26, 2011 Please can you explain me how to change the date of time value for voucher ? $voucher->date_to = (date('Y') + 1).date('-m-d'); I want to change for 1 months ... Link to comment Share on other sites More sharing options...
need4speed Posted January 26, 2011 Share Posted January 26, 2011 The cron job is allways a hard ass thing to setup so I found this solution and its free...http://www.setcronjob.com/ Link to comment Share on other sites More sharing options...
marlo Posted February 10, 2011 Share Posted February 10, 2011 here is answer for my last question : $voucher->date_to = strftime('%Y-%m-%d', strtotime('+1 month')); Link to comment Share on other sites More sharing options...
Inuska Posted February 15, 2011 Share Posted February 15, 2011 Does not work for me (( Where should I set the point one - the cron job? I enclose my php files, can anobydy help me? birthdaypresent.zip Link to comment Share on other sites More sharing options...
need4speed Posted February 15, 2011 Share Posted February 15, 2011 Try this cronservice its much easier than setting up your own.http://www.setcronjob.com/Im actually not sure if the Prestashop birthday module actually works everytime Link to comment Share on other sites More sharing options...
Inuska Posted February 15, 2011 Share Posted February 15, 2011 Try this cronservice its much easier than setting up your own.http://www.setcronjob.com/Im actually not sure if the Prestashop birthday module actually works everytime Thanks for this tip, I set new cron job, tried, log says cron job is OK, but no voucher was sent ( seems to be some error in my birthdaypresent.php , have no clue where... Link to comment Share on other sites More sharing options...
need4speed Posted February 15, 2011 Share Posted February 15, 2011 Have you tried to follow the adjustment from the topic post that Francisco Carlão has created? Link to comment Share on other sites More sharing options...
Inuska Posted February 15, 2011 Share Posted February 15, 2011 Have you tried to follow the adjustment from the topic post that Francisco Carlão has created? Yes. I am sure I did not make any mistake. See above, the file is enclosed in zip. Link to comment Share on other sites More sharing options...
need4speed Posted February 15, 2011 Share Posted February 15, 2011 It works for me. Have you tried to just to enter the cronjob url in your browser? Link to comment Share on other sites More sharing options...
Inuska Posted February 15, 2011 Share Posted February 15, 2011 It works for me. Have you tried to just to enter the cronjob url in your browser? White empty page for my birthdaypresent.php Link to comment Share on other sites More sharing options...
need4speed Posted February 16, 2011 Share Posted February 16, 2011 You should not use the birthdaypresent.php file buthttp://www.xxxxx.com/modules/birthdaypresent/cron.php Link to comment Share on other sites More sharing options...
Inuska Posted February 18, 2011 Share Posted February 18, 2011 You should not use the birthdaypresent.php file buthttp://www.xxxxx.com/modules/birthdaypresent/cron.php I used this link in cron job, seems to work. But no email is sent, no voucher is generated. Link to comment Share on other sites More sharing options...
hups Posted February 21, 2011 Share Posted February 21, 2011 Same for me. I put URL in browser and get OK. Also my server sends an email to confirm cron ok but no voucer gets created and no email is sent...Anyonbe got any ideas please? Link to comment Share on other sites More sharing options...
Pikkuweb Posted December 19, 2011 Share Posted December 19, 2011 With cpanel i succeed to works it putting this command line php /home/*user domanin*/public_html/modules/birthdaypresent/cron.php Link to comment Share on other sites More sharing options...
abadu.plk Posted May 12, 2012 Share Posted May 12, 2012 (edited) Anybody figured it out how to cope with this "one customer problem" ? Normally nobody get the voucher on my site. After i had changed as Francisco wrote to $users = Db::getInstance()->ExecuteS(' SELECT DISTINCT c.id_customer, firstname, lastname, email FROM '._DB_PREFIX_.'customer c WHERE c.birthday LIKE \'%'.date('-m-d').'\''); only one customer get the message. I am looking forward for the solution but it looks like nobody found it. Edited May 12, 2012 by abadu.plk (see edit history) Link to comment Share on other sites More sharing options...
Noracuts Posted July 6, 2012 Share Posted July 6, 2012 Has anyone figured out any of the cron executed modules? My crons run and all say ok but I do not get a birthday email and voucher has been created. My follow-up module doesn't work either. Is it a problems with my server? My permissions? Does anyone know? Let me know if you need me to attach any files or links. Thanks Link to comment Share on other sites More sharing options...
winthur Posted September 19, 2012 Share Posted September 19, 2012 Same problem here. Cron rule for Customer Follow Up module and Birthday Present work correctly, only thing is that despite different account on the same birthday, it will only send one email out to one customer only on the same birthday. they are able to receive vouchers but not email. Im using version 1.4.9 Anyone can help? Link to comment Share on other sites More sharing options...
hairysome Posted September 21, 2012 Share Posted September 21, 2012 I had received a cron job report saying: "Ok" and "Birthday already wished" But no voucher issued to a test user. Can anyone figure this out? Link to comment Share on other sites More sharing options...
hairysome Posted September 21, 2012 Share Posted September 21, 2012 It works! Great! Thank you for your post! Link to comment Share on other sites More sharing options...
fun-perfume Posted November 13, 2012 Share Posted November 13, 2012 It works!!!Thank you! Link to comment Share on other sites More sharing options...
SebastienSerre Posted September 29, 2013 Share Posted September 29, 2013 Hello I've a pb with 1.5.5. in type seting, i've no choice... i should have "fixed amount" or "percent" i Think... Is someone could help me to solve? Many Thx Link to comment Share on other sites More sharing options...
SebastienSerre Posted September 30, 2013 Share Posted September 30, 2013 Sorry I don't know if I was very clear yesterday... I tok a screenshot, I've no choice between percentage or fix amount. Could you please help? Link to comment Share on other sites More sharing options...
SebastienSerre Posted September 30, 2013 Share Posted September 30, 2013 Personne n'aurais une piste a me fournir? Link to comment Share on other sites More sharing options...
SebastienSerre Posted September 30, 2013 Share Posted September 30, 2013 Je pense que mon probleme vient du fait que birthday.php appelle la table discount_type qui n'existe pas j'ai l'impression sur 1.5.5. Quelqueun aurait uneinfo la dessus? Link to comment Share on other sites More sharing options...
fuskoz Posted October 14, 2013 Share Posted October 14, 2013 Yes, I'm also using PS 1.5.5Did anyone fix this module for this version. Just as sebastianserre I'm getting no options in choosing "fixed amount" or "percent" Any help is much welcomed. Thank you in advance Link to comment Share on other sites More sharing options...
SebastienSerre Posted October 14, 2013 Share Posted October 14, 2013 Yes, I'm also using PS 1.5.5 Did anyone fix this module for this version. Just as sebastianserre I'm getting no options in choosing "fixed amount" or "percent" Any help is much welcomed. Thank you in advance Hello I found and use this: https://dl.dropboxusercontent.com/u/105528300/birthdaypresent.zip 1 Link to comment Share on other sites More sharing options...
fuskoz Posted October 16, 2013 Share Posted October 16, 2013 Hello I found and use this: https://dl.dropboxusercontent.com/u/105528300/birthdaypresent.zip Thank you for the prompt reply sebasienserre, I'm actually using PS 1.5.6 but I thought it would be the same as 1.5.5. Apparently there are changes in the way coupons are treated. I cleaned the cache and installed your commandeered module on my 1.5.6 but it still doesn't show "fixed amount" or "percent". Just as before. If you have any other suggestion, you're welcome. Thank you once again. Link to comment Share on other sites More sharing options...
SebastienSerre Posted October 16, 2013 Share Posted October 16, 2013 I'm sorry, I don't understand what's happened as in my PS 1.5.6 it's working great. 1 Link to comment Share on other sites More sharing options...
fuskoz Posted October 18, 2013 Share Posted October 18, 2013 I'm glad for you But tell me if I'm wrong. In the screenshot you sent lately I see you have not chosen "fixed amount" or "percent" type. When you can not select non of the types, is it working as "fixed amount" or "percent"? Thank you Link to comment Share on other sites More sharing options...
SebastienSerre Posted October 18, 2013 Share Posted October 18, 2013 Hello It's working as "percent" Link to comment Share on other sites More sharing options...
fuskoz Posted October 18, 2013 Share Posted October 18, 2013 Perfect...thank you Link to comment Share on other sites More sharing options...
vivek tripathi Posted January 20, 2014 Share Posted January 20, 2014 Code change to show Type option in birthdaypresent Module Inside your birthdaypresent module create folder override/classess and then create file Discount.php write code class Discount extends DiscountCore { public static function getDiscountTypes($id_lang) { $x=array( 1 =>array('id_discount_type'=>'1','name'=>'Discount on order (%)'), 2 =>array('id_discount_type'=>'2','name'=>'Discount on order (amount)'), 3 =>array('id_discount_type'=>'3','name'=>'Free shiping') ); return $x; } } Step 2- uninstall module and then reinstall Note if still not working then please remove/delete file cache/class_index.php and uninstall and install module it will work and Type option will be visible overAll mean to say override the class Discount since in version 1.5+ getDiscountTypes function not present Second Method ----------------------------------- Replace $discountTypes = Discount::getDiscountTypes((int)($cookie->id_lang)); with the $discountTypes = array( 1 =>array('id_discount_type'=>'1','name'=>'Discount on order (%)'), 2 =>array('id_discount_type'=>'2','name'=>'Discount on order (amount)'), 3 =>array('id_discount_type'=>'3','name'=>'Free shiping') ); Link to comment Share on other sites More sharing options...
bocco Posted February 3, 2014 Share Posted February 3, 2014 I did follow your manuals, but I can't select amount or %. Another problem is that modul did not send any email to customer, but voucher code is created. What do I have to do, that modul will also send email? Prestashop: 1.5.6.2 1 Link to comment Share on other sites More sharing options...
Blassen Posted February 18, 2014 Share Posted February 18, 2014 (edited) <div class="margin-form"> <select name="id_discount_type">'; //$discountTypes = Discount::getDiscountTypes((int)($cookie->id_lang)); $discountTypes = array( 1 =>array('id_discount_type'=>'1','name'=>'Discount on order (%)'), 2 =>array('id_discount_type'=>'2','name'=>'Discount on order (amount)'), 3 =>array('id_discount_type'=>'3','name'=>'Free shiping') ); foreach ($discountTypes AS $discountType) $this->_html .= '<option value="'.(int)($discountType['id_discount_type']).'"'.((Configuration::get('BIRTHDAY_DISCOUNT_TYPE') == $discountType['id_discount_type']) ? ' selected="selected"' : '').'>'.$discountType['name'].'</option>'; $this->_html .= ' </select> </div> ....Helped me edit the file birthdaypresent.php line 74 1 / not set a minimum price for the order :-( This line causes fatal error: //$discountTypes = Discount::getDiscountTypes((int)($cookie->id_lang)); Edited February 18, 2014 by Blassen (see edit history) Link to comment Share on other sites More sharing options...
Blassen Posted February 23, 2014 Share Posted February 23, 2014 birthdaypresent.php <?php /* * 2007-2012 PrestaShop * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/afl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * * @edit by Albert Maska http://dragonshop.eu <[email protected]> Czech Republic * @author PrestaShop SA <[email protected]> * @copyright 2007-2012 PrestaShop SA * @version Release: $Revision: 15821 $ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * International Registered Trademark & Property of PrestaShop SA */ if (!defined('_PS_VERSION_')) exit; class BirthdayPresent extends Module { private $_html = ''; function __construct() { $this->name = 'birthdaypresent'; $this->tab = 'pricing_promotion'; $this->version = 1.1; $this->author = 'PrestaShop'; $this->need_instance = 0; parent::__construct(); $this->displayName = $this->l('Birthday Present'); $this->description = $this->l('Offer your clients birthday presents automatically'); } public function getContent() { global $cookie, $currentIndex; if (Tools::isSubmit('submitBirthday')) { Configuration::updateValue('BIRTHDAY_ACTIVE', intval(Tools::getValue('bp_active'))); Configuration::updateValue('BIRTHDAY_DISCOUNT_TYPE', intval(Tools::getValue('id_discount_type'))); Configuration::updateValue('BIRTHDAY_DISCOUNT_VALUE', floatval(Tools::getValue('discount_value'))); Configuration::updateValue('BIRTHDAY_MINIMAL_ORDER', floatval(Tools::getValue('minimal_order'))); Tools::redirectAdmin($currentIndex.'&configure=birthdaypresent&token='.Tools::getValue('token').'&conf=4'); } $this->_html = ' <fieldset class="width3"><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->displayName.'</legend> <p>'.$this->l('Create a voucher for customers celebrating their birthday and having at least one valid order').'</p> <form action="'.$_SERVER['REQUEST_URI'].'" method="post" style="margin-top: 15px;"> <label>'.$this->l('Active').'</label> <div class="margin-form"> <img src="../img/admin/enabled.gif" /> <input type="radio" name="bp_active" value="1"'.(Configuration::get('BIRTHDAY_ACTIVE') ? ' checked="checked"' : '').' /> <img src="../img/admin/disabled.gif" /> <input type="radio" name="bp_active" value="0"'.(!Configuration::get('BIRTHDAY_ACTIVE') ? ' checked="checked"' : '').' /> <p style="clear: both;">'.$this->l('Additionnaly, you have to set a CRON rule which calls the file').'<br />http://'.$_SERVER['HTTP_HOST'].__PS_BASE_URI__.'modules/birthdaypresent/cron.php '.$this->l('everyday').'</p> </div> <label>'.$this->l('Type').'</label> <div class="margin-form"> <select name="id_discount_type">'; // $discountTypes = Discount::getDiscountTypes(intval($cookie->id_lang)); $discountTypes = array( 1 =>array('id_discount_type'=>'1','name'=>'procenta'), 2 =>array('id_discount_type'=>'2','name'=>'cena'), 3 =>array('id_discount_type'=>'3','name'=>'doprava zdarma') ); foreach ($discountTypes AS $discountType) $this->_html .= '<option value="'.intval($discountType['id_discount_type']).'"'.((Configuration::get('BIRTHDAY_DISCOUNT_TYPE') == $discountType['id_discount_type']) ? ' selected="selected"' : '').'>'.$discountType['name'].'</option>'; $this->_html .= ' </select> </div> <label>'.$this->l('Value').'</label> <div class="margin-form"> <input type="text" size="15" name="discount_value" value="'.Configuration::get('BIRTHDAY_DISCOUNT_VALUE').'" onKeyUp="javascript:this.value = this.value.replace(/,/g, \'.\'); " /> <p style="clear: both;">'.$this->l('Either the monetary amount or the %, depending on Type selected above').'</p> </div> <label>'.$this->l('Minimal order').'</label> <div class="margin-form"> <input type="text" size="15" name="minimal_order" value="'.Configuration::get('BIRTHDAY_MINIMAL_ORDER').'" onKeyUp="javascript:this.value = this.value.replace(/,/g, \'.\'); " /> <p style="clear: both;">'.$this->l('The minimal order amount needed to use the voucher').'</p> </div> <div class="clear center"> <input type="submit" value="'.$this->l(' Save ').'" name="submitBirthday" class="button" /> </div> <div class="small"><sup>*</sup> '.$this->l('Required field').'</div> </form> </fieldset><br /> <fieldset class="width3"><legend><img src="../modules/'.$this->name.'/comment.gif" /> '.$this->l('Guide').'</legend> <h2>'.$this->l('Develop clients\' loyalty').'</h2> <p>'.$this->l('Offering a present to a client is a means of securing its loyalty.').'</p> <h3>'.$this->l('What should you do?').'</h3> <p> '.$this->l('Keeping a client is more profitable than capturing a new one. Thus, it is necessary to develop its loyalty, in other words to make him come back in your webshop.').' <br /> '.$this->l('Word of mouth is also a means to get new satisfied clients; a dissatisfied one won\'t attract new clients.').'<br /> '.$this->l('In order to achieve this goal you can organize: ').' <ul> <li>'.$this->l('Punctual operations: commercial rewards (personalized special offers, product or service offered), non commercial rewards (priority handling of an order or a product), pecuniary rewards (bonds, discount coupons, payback...).').'</li> <li>'.$this->l('Sustainable operations: loyalty or points cards, which not only justify communication between merchant and client, but also offer advantages to clients (private offers, discounts).').'</li> </ul> '.$this->l('These operations encourage clients to buy and also to come back in your webshop regularly.').' <br /> </p> </fieldset>'; return $this->_html; } public function createTodaysVouchers() { $users = Db::getInstance()->ExecuteS(' SELECT DISTINCT c.id_customer, firstname, lastname, email FROM '._DB_PREFIX_.'customer c WHERE c.birthday LIKE \'%'.date('-m-d').'\''); foreach ($users as $user) { $voucher = new Discount(); $voucher->id_customer = intval($user['id_customer']); $voucher->id_discount_type = intval(Configuration::get('BIRTHDAY_DISCOUNT_TYPE')); // $voucher->name = 'Narozeninový voucher'.intval($voucher->id_customer).'-'.date('Y'); // $voucher->description[intval(Configuration::get('PS_LANG_DEFAULT'))] = $this->l('Dárkový voucher k Vašim narozeninám!'); $voucher->value = Configuration::get('BIRTHDAY_DISCOUNT_VALUE'); $voucher->quantity = 1; $voucher->quantity_per_user = 1; $voucher->highlight = 1; // zvýraznění $voucher->partial_use = 0; // částečné použití $voucher->cumulable = 0; $voucher->cumulable_reduction = 0; $voucher->date_from = date('Y-m-d'); $voucher->date_to = strftime('%Y-%m-%d', strtotime('+1 month')); // platnost 1 měsíc $voucher->minimal = Configuration::get('BIRTHDAY_MINIMAL_ORDER'); $voucher->active = true; // stav aktivní on-off $languages = Language::getLanguages(true); foreach ($languages AS $language) $voucher->name[(int)$language['id_lang']] = $this->l('Your birthday present !'); $code = 'BIRTHDAY-'.(int)($voucher->id_customer).'-'.date('Y'); $voucher->code = $code; $voucher->description = 'Narozeninovy voucher: '.$code; // $voucher->active = 1; $type = $voucher->id_discount_type = intval(Configuration::get('BIRTHDAY_DISCOUNT_TYPE')); if ($type == 1) { $value = 'SLEVU '.$voucher->value = Configuration::get('BIRTHDAY_DISCOUNT_VALUE'); $types = 'procent'; } elseif ($type == 2) { $value = 'SLEVU '.$voucher->value = Configuration::get('BIRTHDAY_DISCOUNT_VALUE'); $types = 'Korun'; $for_minimal_order = 'pro objednavku nad '.$voucher->minimal = Configuration::get('BIRTHDAY_MINIMAL_ORDER').' Korun'; } elseif ($type == 3) { $types = 'DOPRAVU ZDARMA'; $for_minimal_order = 'pro objednavku nad '.$voucher->minimal = Configuration::get('BIRTHDAY_MINIMAL_ORDER').' Korun'; } else { $types = ''; } $minimum = $voucher->minimal = Configuration::get('BIRTHDAY_MINIMAL_ORDER'); $predmet = $this->l('Your birthday present !'); if ($voucher->add()) Mail::Send((int)Configuration::get('PS_LANG_DEFAULT'), 'birthday', Mail::l($predmet, (int)Configuration::get('PS_LANG_DEFAULT')), array('{firstname}' => $user['firstname'], '{lastname}' => $user['lastname'], '{code}' => $code, '{bert_value}' => $value, '{bert_type}' => $types, '{bert_for_minimal_order}' => $for_minimal_order), $user['email'], NULL, strval(Configuration::get('PS_SHOP_EMAIL')), strval(Configuration::get('PS_SHOP_NAME')), NULL, NULL, dirname(__FILE__).'/mails/'); else echo Db::getInstance()->getMsgError(); } } } ?> and edit /mails/ (sorry olny Czech) Dobrý den, p. {firstname}, {shop_name} Vám chce popřát vše nejlepší k narozeninám a připravil pro Vás malý dárek. Připravili jsme pro Vás malé překvapení... {bert_value} {bert_type} {bert_for_minimal_order} Přihlaste se prosím do Vašeho zákaznického účtu v našem obchodě a převezměte si kupón se slevou. Kód slevového kupónu: {code} můžete využít v nákupním košíku Uvedený kód stačí vložit do vyhrazeného pole v nákupním košíku. {shop_url} Powered by PrestaShop™ {firstname} user name{shop_name} eshop name {bert_value} value discounts (NEW) {bert_type} type of discount (price, percent, ...)(NEW) {bert_for_minimal_order} price minimum order(NEW) {code} Discount code (voucher)(NEW){shop_url} shop url :-) (I would like to use variables in the language, but it was not me)in English by a piece of code in birthdaypresent.php could look like this: $voucher->description = 'birthday voucher: '.$code; // $voucher->active = 1; $type = $voucher->id_discount_type = intval(Configuration::get('BIRTHDAY_DISCOUNT_TYPE')); if ($type == 1) { $value = 'SALE '.$voucher->value = Configuration::get('BIRTHDAY_DISCOUNT_VALUE'); $types = 'percent'; } elseif ($type == 2) { $value = 'SALE '.$voucher->value = Configuration::get('BIRTHDAY_DISCOUNT_VALUE'); $types = 'Euro'; $for_minimal_order = 'for minimum order '.$voucher->minimal = Configuration::get('BIRTHDAY_MINIMAL_ORDER').' Euro'; } elseif ($type == 3) { $types = 'FREE SHIPPING'; $for_minimal_order = 'for minimum order '.$voucher->minimal = Configuration::get('BIRTHDAY_MINIMAL_ORDER').' Euro'; } else { $types = ''; } Make improvements to email me at cert.bert @ volny.czI'd love to learn something new. This is what I did for my needs, so I'm fine.Thank you and good luck. Me, the version is: 1.5.5. = I have not tested other !!! Link to comment Share on other sites More sharing options...
Blassen Posted February 23, 2014 Share Posted February 23, 2014 en.php unprofessional to translate it: <?php global $_MODULE; $_MODULE = array(); $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_c2796655c25e1b0b8582716036aece08'] = 'Birthday Surprise'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_d1f5899bf2af57ed816390d9d740daf6'] = 'READ birthday gifts to your customers automatically'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_ccfcf858237a83953c1ac03b5abde35e'] = 'Create a voucher for customers celebrating birthdays and having at least one valid order'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_4d3d769b812b6faa6b76e1a8abaece2d'] = 'Enable'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_52292d2f9c39936bc72fbd47a3060df3'] = 'CRON Additionally, you must set a rule that will trigger file'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_f7e78e04cba74c610354e91e622cc105'] = 'every day'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_a1fa27779242b4902f7ae3bdd5c6d508'] = 'Kind discounts'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_689202409e48743b914713f96d93947c'] = 'value discounts'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_998d08a9606f9656e8d1fcab8b762155'] = 'The amount or percentage difference depending on your previous choice.'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_1f0084a1581c05622120bd827305f173'] = 'Minimum Order'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_783d0f2960c7c628177f740ce38ec3e7'] = 'The minimum order for the option to use the coupon'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_38fb7d24e0d60a048f540ecb18e13376'] = 'Save'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_19f823c6453c2b1ffd09cb715214813d'] = 'required by'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_6602bbeb2956c035fb4cb5e844a4861b'] = 'Wizard'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_cb21e843b037359d0fb5b793fccf964f'] = 'Developing customer loyalty'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_d725bab433ae44aee759eb82a24b09de'] = 'Offer a gift to clients is a good way of keeping loayality .'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_0dc42f38b35e45090e1a1c94755c2d43'] = 'What should you do ?'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_83e2cc1dd0205949c98f041a939b1e6a'] = 'client management is more profitable than acquiring a new one. Therefore, it is essential that loyal , in other words, to make them want to come back to your store .'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_0c2ccbf300070c80e642a4924e4468cb'] = 'Word of mouth is also a good way to get new customers satisfied as dissatisfied customer will not attract new ones.'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_40436d8f0cc9466c7b6c8304e156b427'] = 'There are many ways to do this:'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_517d5d94073a17a4191f1a7e5eea9347'] = 'casual business business rewards (personal special offers , products or services offered) that are not commercial rewards (handling priority order or product) , cash rewards (bonds , discount Coupons , return ... ) .'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_f299b58558601a85c98a2d1d7867d523'] = 'Offer customers also personal discounts or coupons that will justify your customer communication.'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_8bea4d59aac565a6e581c77848943497'] = 'These operations encourage customers to buy and to return to your online business on a regular basis .'; $_MODULE['<{birthdaypresent}prestashop>birthdaypresent_d46bd07675d08116e85f8a4c7866de53'] = 'Your birthday present !'; config.xml <?xml version="1.0" encoding="UTF-8" ?> <module> <name>birthdaypresent</name> <displayName><![CDATA[Birthday Surprise]]></displayName> <version><![CDATA[1]]></version> <description><![CDATA[READ birthday gifts to your customers automatically]]></description> <author><![CDATA[PrestaShop]]></author> <tab><![CDATA[pricing_promotion]]></tab> <is_configurable>1</is_configurable> <need_instance>0</need_instance> <limited_countries></limited_countries> </module> Link to comment Share on other sites More sharing options...
chatters Posted February 24, 2014 Share Posted February 24, 2014 Hello, you working great and thanks for nice sharing. http://www.thegreatonlineshoppingfestival.com/ 1 Link to comment Share on other sites More sharing options...
africanodama Posted May 17, 2017 Share Posted May 17, 2017 Hi, What if customer change date for birhtday? Module send voucher again. How to check if customer receive voucher for that year? Link to comment Share on other sites More sharing options...
Recommended Posts