Jump to content

redrum

Members
  • Posts

    28
  • Joined

  • Last visited

Everything posted by redrum

  1. I have inactivated English, and then I don't have the option to switch language when editing a product. In the product list the Name become "N/A", but when I go to the page for editing a product the product name and description is correct. Looking at this it just hit me, I think it might have to do with the product import I've made. I think I configure the script so the swedish language id was 1, but the id is actually 2 in the installation that I'm working on now.
  2. Thanks for your reply and the heads [email protected] I took a brief look in the database and saw that it would be some complications. I'm in the beginning of a new installation and I have migrated a bunch of customers and orders, and I thought I could take a shortcut. but it probably won't end well My main issue is that I want to have the BO in English, and FO only in Swedish. That's an easy fix by doing the proper settings in BO. The problem arise when I want to add or edit a product in BO. When I add/edit a products it is done in the BO-language (which is english), but the FO is set to only show Swedish.
  3. I have two installed language English (id: 1) Swedish (id: 2) I want to change the id on these two language. Like this: English (id: 2) Swedish (id: 1) I can see that this should be done in the db table 'ps_lang', under the column 'id_lang'. But do I need to change something else anywhere in the database, or in any file for that matter? Thanks
  4. Thanks for your pointers and suggestions, I appreciate it. I will give it some thought and do some testing and see if there is a smooth way to achieve my goal with only one language installed. I want to keep it simple for future updates. I'll rather not let this become like my old osCommerce with fixes here and there in various files 😅
  5. Thanks for your reply. This was also a concern of mine, preformance-wise. I did some investigating here on the forum. I recall some one said that it wouldn't do any negative performance. But the sense is that it will. You have more data in the database and you need an additional query. So I agree with you. If I only going to have one language installed (Swedish in this case), but still want English the BO. Is there a good and smooth solution for this? Or do I need to translate the Swedish language-files for the BO into English?
  6. I have two installed languages in my PrestaShop; English (database id: 1) Swedish (database id: 2) English is inactive/disabled since I only need the Swedish language in the Front Office. BO use the English language, I set the "Language" to "English (English)" under "Team / Employees > User" in the BO. Will it conflict in anyway? For example when I add new products, since I can only add a product in one language with these settings. Thanks!
  7. Thanks El Patron! I will look into this and try to figure out what is best for me. Right now I'm on a dedicated server and run osCommerce for the production site. But I work on a switch to Prestashop. And the company that host the dedicated server contacted me and offered me a switch to one of their hosted accounts. So I need to find out if they have a hosted account that have enough performance for me.
  8. Thanks SmartDataSoft! Your help and input is very much appreciated. I noticed that orders with already existing invoice could be generated once again, so I end up with multiply rows with the same id_order in the table ps_order_invoice. So I made a small addition to the function. It might not be the best optimized way, but I guess it will work. public static function generateInvoice() { $result = Db::getInstance()->executeS("SELECT `id_order` FROM `" . _DB_PREFIX_ . "orders` WHERE `id_order` BETWEEN 1 AND 90"); foreach ($result as $order) { $oid = $order['id_order']; $check_invoces = Db::getInstance()->executeS("SELECT `id_order` FROM `" . _DB_PREFIX_ . "order_invoice` WHERE `id_order` = " . $oid); $match = mysqli_num_rows($check_invoces); if ($match > 0) { continue; } else { $order = new Order((int)$order['id_order']); if (Validate::isModuleName($order->module)) { $order->setInvoice(true); } } } }
  9. I need to generate invoices for some orders that I have imported into the prestashop database. I use the following function: public static function generateInvoice() { $result = Db::getInstance()->executeS("SELECT `id_order` FROM `" . _DB_PREFIX_ . "orders` WHERE `id_order` BETWEEN 10 AND 100"); foreach ($result as $order) { $order = new Order((int)$order['id_order']); if (Validate::isModuleName($order->module)) { $order->setInvoice(true); } } } Would this be a good solution, or is there a better and smoother way to generate invoices? Thanks, Fredrik
  10. Thanks all for the information, it's appreciated! El Patron, where can I find information of what the correct and proper mysql configuration are?
  11. I 1.7.5 + kan man slette gender, och det verkar vara ok att göra det;
  12. Hoppas svenska genom google translate är ok Vil der være noget galt hvis du bare sletter Hr och Fru / Mr och Mrs i "Configure > Customer Settings > Titles"?
  13. Well, it turned out it just was an error in a .tpl file 😂
  14. This is so so so crazy. I'm pretty sure that all I did was going into 'Payment > Preferences' and assign certain payment methods to certain country's. And then I had the same issue. Big thank you to crisalidainhalada that pointed my in the right direction! Of course it wast that easy, I had to dig around some more to get back the payment methods in the checkout. It looks like I also had to add make sure each payment method is assign to the proper/all customer groups in the table 'ps_module_group'. Example: - ps_wirepayment has the id_module 34 (id_module is found in the table 'ps_module') - You have 3 customers groups (id_group is found in the table 'ps_group') Then table 'ps_module_group' need to contain this: id_module | id_shop | id_group 34 | 1 | 1 34 | 1 | 2 34 | 1 | 3 I believe that's where my main issue were. That and what crisalidainhalada describes in his post. I'll try to come whit an update when I know for sure if the above thing was the solution.
  15. The closest I come to that, without changing the code further, is 21-06. {order->date_add:%7.7s:last:5}
  16. I wanted to fetch the last number from the order id myself. So I made an small addition to orderreference.php I haven't tested it, but it look fine in the back office preview. You can see what I changed at https://github.com/topfuel75/PrestaShop-Order-Reference/commit/a6a87c6d01762a7470fb24d88410966943b7bd87#diff-1da936e8328bb26324e0931c8b2c217f8a6c73cbc56f1d05ea5f511b1146f455 So in your case the following format should pull out the last 3 digits from the order id: {BE}{order->date_add:%4.4s}{order->id:%03d:last:3} I noticed that the following also seems to work {BE}{order->date_add:%4.4s}{order->id:%d:last:3} Let me know how it goes.
  17. As for removing the product IDs; It seems like you have to change the product name if two or more items have the same product name. What happens if I don't change the product name so they all are unique? As default, a good approach to handle products that don't have a unique product name might be to add a number last in the url, i.e www.shop.com/category/productname-1 www.shop.com/category/productname-2 And then you can go and chance the product names to a unique one if you don't like the above urls.
  18. I noticed that checking for the quantity of a product (with attribute), PrestaShop checks the table 'ps_product_attribute'. And when checking for a product stock location, PrestaShop looks in the table 'ps_stock_available'. Never the less, my questions still remains.
  19. I'm doing a migration from osCommerce to PrestaShop I noticed that both tables 'ps_stock_available' and 'ps_product_attribute' contain the columns 'quantity' and 'location'. As far as I can see its the data in the table 'ps_stock_available' PrestaShop is looks in when we want to get information about quantity and location. So, whats the reason 'quantity' and 'location' exists in two different tables? Does the one table do something that the other doesn't, or are the mentioned columns in table 'ps_product_attribute' redundant? Cheers!
  20. As for the file src/PrestaShopBundle/Resources/views/Admin/Product/catalog.html.twig you should be able to place the code wherever you want the input field to appear. However, this Prestashop forum don't allow entering some code lines. It transform some code to [spam-filter]. Its quite odd that the forum don't allow to enter Prestashop core code. Ahh, yes. If that is possible and you don't use "per litere, per kilo" I guess its a much better solution. Its best to keep the core code as clean as possible. And whenever the "warehouse location" will be available in the core it shouldn't be that difficult to move the data into that table. Thanks for finding out about this solution.
  21. The rows may differ a bit, thats why I wrore "AROUND" But in src/PrestaShopBundle/Resources/views/Admin/Product/catalog.html.twig you should be able to put it where ever you want it to be displayed. So try to put the code on a different row and see if it will work better for your needs. And if you improve it, please post it.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More