B@ndit Posted November 27, 2013 Share Posted November 27, 2013 Hi, my boss asked for a tick box added to the shopping cart so people can tick it and an extra euro will be taken from their payment which we will then donate to a local charity..... Im not really sure where to start, or even if theres a premade option available... any thoughts appreciated Steven Link to comment Share on other sites More sharing options...
Dh42 Posted November 27, 2013 Share Posted November 27, 2013 You can convert the gift wrapping to this just by renaming the text and adding a fee if you want. 2 Link to comment Share on other sites More sharing options...
B@ndit Posted November 29, 2013 Author Share Posted November 29, 2013 (edited) You my friend are a true genius...... just wondering though if I want to change the word WRAPPING in the cart to DONATION how can I do this? what file should I edit? I cannot edit the file through translations as it is too big and will not load and my ISP will not assist in this matter, here is the prestashop error, and what the isp said... Total expressions : 3982. Click the fieldset title to expand or close the fieldset.. Warning, your hosting provider limits the maximum number of fields to post in a form:1000 for max_input_varsPlease ask your hosting provider to increase the suhosin post and request limit to 4082 at least. or edit the translation file manually. Hi Steven, Unfortunately, it would not be possible to raise that on shared hosting with your configuration. To do that with ourselves you'd need at least a Cloud server: http://www.blacknight.com/cloud-hosting.html Regards, Liam. Edited December 1, 2013 by B@ndit (see edit history) Link to comment Share on other sites More sharing options...
parsifal Posted December 4, 2013 Share Posted December 4, 2013 Before taking your hosting provider at their word, you should check yourself to see if you can edit PHP settings for your website. You probably have been given access to a hosting panel like CPanel, Plesk or somesuch to make changes to your configuration. Enter this panel and search for a menu option/item that allows you to edit your own custom php.ini file and add something like the following: max_input_vars = 10000; suhosin.get.max_vars = 10000; suhosin.post.max_vars = 10000; [source: http://www.prestashop.com/blog/en/utilize-the-php-ini-file-to-optimize-your-ecommerce-store/] If there is no option for custom php.ini, only then you should resort to manual editing of translation files. Link to comment Share on other sites More sharing options...
Dh42 Posted December 4, 2013 Share Posted December 4, 2013 And don't upgrade to a cloudserver, it would be like downgrading in most cases. Link to comment Share on other sites More sharing options...
B@ndit Posted December 6, 2013 Author Share Posted December 6, 2013 Thank you both for the valuable information. I will check out the PHP later today, I did however try to find and edit the translation file by logging into the site via filezilla but could not find the translation file.... is it called something weird or just translation? I did find a folder called Translations and viewed all files in that but the word wrapping appears nowhere..... any ideas as to where this mysterious file is hiding? regards Steven Link to comment Share on other sites More sharing options...
parsifal Posted December 6, 2013 Share Posted December 6, 2013 (edited) Hello Steven. If you can't find an option for custom php.ini, there is one workaround with .htaccess file that you could try: http://mypresta.eu/en/art/know-how/max-input-wars-in-prestashop-translations-feature.html If that fails also, we go back to the manual editing method. And unfortunately, manual editing of translations is not a trivial process! Problem 1: There is not a uniform location for the translation files: some are located inside the modules subfolders, some in your theme's subfolders etc etc. In your case, you want to translate the string with canonical name "Wrapping" that appears in your Front Office inside the blockcart module's position. The file which holds the English translations for this module should be this: modules\blockcart\translations\en.php. Make a backup copy of this file and then open it for editing. And now we come to... Problem 2: This file is (or should be) more or less, empty: <?php global $_MODULE; $_MODULE = array(); ?> Now what? What should you add here to change the translation of "Wrapping"? Well, it would be something like the following: <?php global $_MODULE; $_MODULE = array(); $_MODULE['<{blockcart}prestashop>blockcart_ba794350deb07c0c96fe73bd12239059'] = 'Donation'; ?> Crazy, right? Especially the indecipherable part after the underscore character. This is the MD5 hash for the canonical value ("Gift") of this string. You can get this hash value by going to an online MD5 encrypter (example) and entering the string you want. Please, make backup copies before following the above process. It should work, but I have not tested it. Edited December 6, 2013 by parsifal (see edit history) 1 Link to comment Share on other sites More sharing options...
B@ndit Posted December 6, 2013 Author Share Posted December 6, 2013 Holy Moly..... looks like Ive got a bit of homework to do later.... thanks for the assistamce, Ill give it a go n let you know if I was successful. many thanks Link to comment Share on other sites More sharing options...
parsifal Posted December 6, 2013 Share Posted December 6, 2013 You can also check this resource: http://doc.prestashop.com/display/PS15/Translations+in+PrestaShop+1.5 Link to comment Share on other sites More sharing options...
Recommended Posts