Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Wartin

  1. As far as I know you will have to delete that part from products' template. (make a backup first) Edit /themes/niara/product.tpl Search for these lines: <li> <a href="javascript:print();" title="{l s='Print this page'}"> <i class="icon icon-fw icon-print"></i> {l s='Print'} </a> </li> And erase them. Write this down, as if you update TB this change will be overwritten.
  2. Just add this to Preferences -> Custom Code -> Add custom CSS .btn:hover { background: #86c211; border: 1px solid #336600; } .btn-primary { background-color: #336600; } (change the colors to the colors of your preference) PD: to find out what CSS to change, for example in firefox you can try pressing F12. After that, with Control-Shift-C (or the very first icon) you can select something in the page and see what's the CSS involved. You can change things to try colors or changes there, and then write them in Custom CSS.
  3. I'm afraid you can't edit it from the Backoffice. Two columns in mobile it not a template option. That's why the changes are made directly in the template code. Are you in a shared hosting? You need to edit the template file directly, with a text editor. If you have SSH access you can log in and go to template directory, and edit it there. If you have FTP access you can do it from there, depending on your ftp program (or just download it, edit it in your computer and then upload it again) As you are modifying the file that shows your products, editing a .tpl could break things. Before editing make a backup of the file.
  4. If you use Niara theme, you have to edit /themes/niara/product-list.tpl the first lines, changed, are: {if $page_name == 'index' || $page_name == 'product'} {$product_block_size_class = 'col-xs-6 col-sm-4 col-md-3'} {else} {$product_block_size_class = 'col-xs-6 col-sm-6 col-md-4'} {/if} (it read col-xs-12 instead of col-xs-6)
  5. Hello! I've just found out that the example file you can download to copy the headers for combination import is wrong. The second column should be 'Reference' and not 'Attribute'. The error was about group_type, that has to be of one of values: select, radio, color I read in a forum that Prestashop 1.6 has this problem too. I think it would be really great, to understand CSV, that the products listed to be the same that comes in TB as test products. Edit: I attached the same file, just added a new row (the second one). combinations_import.csv
  6. I didn't know what all these buttons in products do: Now I know the second is an export. Very nice. The last one add that query to SQL queries. I don't know what could be wrong, but the exported file using button number two is separated only by ; So when I open it in for example libreoffice all the rows appear one after the other, in one line. Any help will be appreciated.
  7. Hello. I tried to access your store from an Android phone (using firefox) and I do see the price. Try asking for 'desktop site'. Try in Private window. Try another browser in the same phone. Good luck
  8. I noticed that my products' description, after my test import, didn't have different lines, but just plain text all in one line. I use the data from SQL query where I select product's description. If I press 'view' button, the description shows something like: <div class="rte"> <p>adsf asd fasdfhal dsfash dfahsd fasjd</p> <p> </p> <p>asd</p> <p>f as</p> <p>df as</p> <p>df</p> <p>s</p> <p>long description</p> </div> If I export the same SQL command, resulting .sql file reads: adsf asd fasdfhal dsfash dfahsd fasjd^M ^M asd^M f as^M df as^M df^M s^M long description^M Obviously, when I use that .CSV file in an import, the description fields get broken. Maybe html is getting sanitized before exporting the CSV file? Thanks!
  9. Hello. I read in forums that it is possible to keep prices and stock updated via CSV import. The ERP's DB with the prices is very old and cannot make queries, so I export a listing, and after some bash magic I have a .csv prepared for import in TB, with real shop ID numbers (I use reference numbers to compare) With the same IDs as the shop, I choose 'Force ID numbers'. I can update, it works fine. But: I've figured out that if Description is empty, it deletes the old description. If the name is empty, it fails with 'name cannot be emtpy'. I would expect it to update the field if it has a value, and make nothing if it hasn't any, but not to empty it. Is it possible? It would make preparation of the import CSV much easier, as it would be done just with ID, price and stock columns. Thanks!
  10. I finally could understand your answer. That was the problem. I had the same 403 forbidden error when adding SQL queries. It is a shared host, so I logged in to cPanel and search for 'security'. After disabling Mod security I could create my query, and then i activate it again. Thanks!
  11. Hello. I was trying community-theme-modded by @toplakd. It has some great great things. For example, the cart in the checkout is just perfect for mobiles. He got rid off the table and replaced it with 'divs'. I tried to implement those changes to Niara, unsuccessfully. There are so many changes and couldn't make it yet. I'd like to know if somebody has tried or done it. Thank you! PS: this is the post for toplakd's theme, you can see the screenshots and try it too:
  12. One more :) I had to change some things to make it work well. I'll send my files, maybe it's useful. 1) In Niara, as I said above, checkboxes didn't appear. Just after radio buttons there is always a <span> tag, unlike Community. If it's not there, the radio button is not shown. this is true in 'Accept terms', select delivery address and in carrier selection. 2) Instead of adding all the functions from order-carrier.js to order-address.js, I added those two files to the override override/controllers/front/OrderController.php public function setMedia() { parent::setMedia(); if ($this->step == 1) { $this->addJS(_THEME_JS_DIR_.'order-address.js'); $this->addJS(_THEME_JS_DIR_.'order-carrier.js'); } } 3) In Step 2, I had an error in js console with updateExtraCarrier (did't find it, as it's in cart-summary.js). I added that function at the end of order-carrier.js. It's really cleaner to have 3 steps, maybe these changes are useful for somebody using Niara. If you find something wrong, please tell me. To use it, just like parents', make backup of your files and uncompress the .zip file in your shops' / 3step-niara.zip
  13. I had troubles with js in second step. If I press 'Read terms and conditions' link the modal didn't appear, but loaded in a new page. It didn't check if terms and conditions was checked and loaded step 3 if it wasn't. I saw you added functions from order-carrier.js to order-address.js, but for some reason didn't work in my almost ready shop (but yes in another brand new TB). So I added this to the override (override/controllers/front/OrderController.php), maybe could be used only this and not the js addition to order-address. public function setMedia() { parent::setMedia(); if ($this->step == 1) { $this->addJS(_THEME_JS_DIR_.'order-carrier.js'); } }
  14. Hello. Here in Niara the checkbox doesn't appear. I compared the original order-carrier.tpl and it has a <span> around the terms and conditions phrase, like this <span class="label-text"> {l s='I agree to the terms of service and will adhere to them unconditionally.'} </span> Now the checkbox appears. I attach my complete file, themes/niara/order-carrier.tpl, with this change (line 354) order-carrier.tpl
  15. Oh, I realized how it's supposed to be, as seen in your first post image. Something is wrong here, as in Address it's not appearing the carriers below, and I can press 'next', it goes to the old carriers page (without step number in URL) . Let me investigate more. EDIT: cache issues.... after reading in you where is included carrier in order-address i went to that file, write something and save... and now it takes the changes. excelent. Thanks for the link!!
  16. Hello @toplakd. First of all thanks for this mod, it's really more clean and nice to see less steps. I'm just trying it in a backup installation and it works perfect. I just notice that you hid the order-steps bar when we are in shipping. I found it weird, so I uncommented: <!-- ALZA Removing order steps from carrierer template for 3 page checkout {include file="$tpl_dir./order-steps.tpl"} --> And changed the name of that step to: {l s='Address & shipping'} in order-steps.tpl I'm trying to make it more mobile friendly, and liked your screenshots, could you send me your community theme mod, please? I'm using Niara, but can compare and try to adapt it. Thanks!
  17. Is there any webserver log? Are the modules enabled? Go to Modules from Backoffice. Or try reinstalling theme.
  18. Can you enter to the Backoffice? You can try to enable Debug Mode. Then reload the Fontoffice.
  19. OK, I could do it. I had to create a composer.json with the directories and php fies. "autoload": { "classmap": [ "./Dir1/file.php", "./Dir1/Dir2/file2.php", "./Dir1/Dir3/", ] }, And then run: composer dump-autoload -o then in my module file: require_once dirname(__FILE__) . '/vendor/autoload.php'; Now I can call, for example: $val = new myclass();
  20. Hello. I'm making (trying to make) a carrier module for a carrier service in my country. I made an API version, based on carrier example code I found on github. I have a module that installs, adds a new carrier and after setting it up give me the price the API returns in the checkout. Very nice. The service also has an SDK for PHP. I tried it in a file out of TB and I can make calls and get prices. it uses 'use' and autoload function to load files. I had to add an spl_autoload_register function at the top of my .php file. I thought it would be easy to use the SDK in my module.... but I couldn't do it. Any advice? I read a lot today... Thanks!
  21. Bonjour @popolon, that was the problem! Merci :) I have a question, do you have a mails directory in your theme too? Because I edited all the mail templates but in /themes/niara/mails/es (from the BO I get a forbidden msg) now I copied order_conf_productan_list.tpl order_conf_product_list.txt to /themes/niara/mails/es and the order confirmation email now have the order detail. This is a little bug. Au revoir!
  22. Hello. Is it normal that every time I change some configuration in one carrier it changes its ID?. I've just edited one to change it's title and now its ID is 41, not 40 as before editing. TB 1.1.x here. Thanks
  23. Hello. A month ago I saw a store that showed thumbnails of the products listed as you type. I tried to do it, and found this: https://www.prestashop.com/forums/topic/511807-add-images-in-search-bar/ After changing some variable and fields names I managed to make it work, but changing /classes/Search.php. Now I know how to make overrides, here is the explanation for Niara theme. Again if there are changes to make it work better just tell me. First we change one query and then the js code to show the products with the image. 1) copy classes/Search.php to override/classes/ 2) edit override/classes/Search.php, change this line: class SearchCore to class Search extends SearchCore 3) go to this if ($ajax) { ... } and change the whole block to: if ($ajax) { $sql = 'SELECT DISTINCT p.id_product, pl.name pname, cl.name cname, cl.link_rewrite crewrite, pl.link_rewrite prewrite '.$score.', pi.id_image pimg FROM '._DB_PREFIX_.'product p INNER JOIN `'._DB_PREFIX_.'product_lang` pl ON ( p.`id_product` = pl.`id_product` AND pl.`id_lang` = '.(int) $idLang.Shop::addSqlRestrictionOnLang('pl').' ) '.Shop::addSqlAssociation('product', 'p').' INNER JOIN `'._DB_PREFIX_.'category_lang` cl ON ( product_shop.`id_category_default` = cl.`id_category` AND cl.`id_lang` = '.(int) $idLang.Shop::addSqlRestrictionOnLang('cl').' ) INNER JOIN `'._DB_PREFIX_.'image` pi ON ( p.`id_product` = pi.`id_product` AND position = 1 ) WHERE p.`id_product` '.$productPool.' ORDER BY position DESC LIMIT 10'; return $db->executeS($sql, true, false); } Delete every function but the one we changed. At the bottom don't forget to leave a '}' to close the class definition. In order to make TB take the override, delete /cache/class_index.php We've made the query that now contains our product's image. Now we have to show it. Edit /themes/niara/js/modules/blocksearch/blocksearch.js And change this: parse: function(data) { return data.map(function(product) { return { data: product, value: product.cname + ' > ' + product.pname }; }); }, with: parse: function(data) { return data.map(function(product) { return { data: product, value: '<img src="https://YOUR-STORE/img/p/4/2/' + product.pimg + '-Niara_small.jpg" /> ' + product.cname + ' > ' + product.pname }; }); }, Now just type something it the search bar, wait a second and look all the products appear with its images :) Search.php
  24. Great, @datakick, I made those changes. Very important to call the parent, and it's easier to understand what the override does. Thanks!
  25. Well, I could solve the second question, about using one specific carrier for one (or more) cities (in fact postal codes). I followed this post: https://www.prestashop.com/forums/topic/160695-solved-carrier-by-postcode-the-easy-way/ but didn't work, so I'll write my steps. It's my first override, if there is something wrong just tell me, please. 1) Go to Localization -> Zone. Add a new one. In my case I used the name of my city. It could be anything. Remember the Zone ID of this zone, we'll need it. 2) Go to Transport -> Carriers. Create a new carrier, and select just the zone we've just created. Put some price and weight ranges. Select 'most expensive' in out-of-range (It doesn't work if you don't, I don't know why) 3) Copy "classes/Address.php" to "override/classes/Address.php". 4) In line 37 change: class AddressCore extends ObjectModel to: class Address extends AddressCore Add a } in line 353 (at the very end of the function getZoneById() delete lines 39-309 Line 322, function getZoneById($idAddress), we'll add some lines at start. 2450 is the Postal Code of the city you want to use with a specific Carrier (change it with yours). As it's an array, it could be more than one postal code (just separate them with commas). where it says '9', write your new Zone ID public static function getZoneById($idAddress) { $postcode=self::getPostcodeByAddress($idAddress); if(in_array($postcode,array(2450))){ return 9; } else{ Now go just before the function getZoneByAddress, and add this function: /** * Return postcode of address * * @param $id_address Address id * @return integer postcode */ public static function getPostcodeByAddress($id_address){ $row = Db::getInstance()->getRow(' SELECT `postcode` FROM '._DB_PREFIX_.'address a WHERE a.`id_address` = '.(int)($id_address)); return $row['postcode']; } Ready. As we have changed some code, we need to make TB read the changes. Delete /cache/class_index.php Go and try to checkout, it should show the carrier you made specially for our new zone. Address.php
  • Create New...