Jump to content


  • Posts

  • Joined

  • Last visited

Destiny84's Achievements


Newbie (1/14)



  1. I know this issue is marked solved, but I stumbled upon this problem and found a one-liner solution. this is the error I received : Fatal error: Uncaught Duplicate entry '82-0-0-0-0000-00-00 00:00:00-0000-00-00 00:00:00-1-0-0-0-0-1-2' for key 'id_product_2'<br /><br /><pre>INSERT INTO `ps_specific_price` (`id_shop_group`, `id_shop`, `id_cart`, `id_product`, `id_product_attribute`, `id_currency`, `id_specific_price_rule`, `id_country`, `id_group`, `id_customer`, `price`, `from_quantity`, `reduction`, `reduction_tax`, `reduction_type`, `from`, `to`) VALUES ('0', '1', '0', '82', '0', '0', '2', '0', '0', '0', '-1', '1', '0', '0', 'amount', '0000-00-00 00:00:00', '0000-00-00 00:00:00')</pre> thrown in C:\web\presta_beautiful\classes\db\Db.php on line 791 As it turned out, the function getAffectedProducts in classes/SpecificPriceRule.php could return results like this: Array ( [0] => Array ( [id_product] => 82 [id_product_attribute] => ) [1] => Array ( [id_product] => 82 [id_product_attribute] => ) ) The solution is to change SpecificPriceRule.php around line 285 return $result; to $result = array_unique($result); return $result;
  2. I know this is an old topic but maybe someone comes here through Google like I did. The problem is that there is no employee object in the context when noone is logged in, so calling the function isLoggedBack() on a non-object throws the error. What works is this : if(!Context::getContext()->employee || !Context::getContext()->employee->isLoggedBack()) { echo 'not logged in'; }
  3. I have built my own import script which fetches product data from a feed and imports them into my prestashop When the import is done, about 5% of the products have the following attributes: date_add : 0000-00-00 00:00:00 minimal_quantity : 0 available_for_order : 0 show_price : 0 I don't touch any of these attributes during import so they should have their default values (actual date of import, and 1 for the others). Does anyone have an idea what might cause this behaviour?
  4. I have a problem with taxes on invoices. An example of the problem is the following; items cost 99 cents tax included. Tax rate is 21% , which cones to a price of 0.81818 tax excluded. The customer buys 30 items. The invoice shows Product total (tax excluded ) 0.82 * 30 = 24.60 Product total (tax included) 0.99 * 30 = 29.70 Total tax 29.70 - 24.60 = 5.10 While the real tax exl. total should be 0.818181 * 30 = 24.545 The tax calculation is off by almost 6 cents in this case, which is a huge deal. I took a look in the order_detail and order_detail_tax tables in the database and noticed all values being stored were rounded which explains the errors. I think however that the unit_price_tax_excl should be equal to original_product_price (which are 0.820000 and 0.818182 resp.), OR the original_product_price should be used for tax calculation. Is there anything I can do about this? Is this by design because taxes work differently where Prestashop is developed (France I suppose), or is this a bug? Any help would be gladly appreciated.
  5. thank you. That was exactly what I was looking for. I hadn't seen that option yet
  6. One of my modules is currently listed to be compatible up until 1.5.3. The module is compatible with the latest versions as well without needing any changes. Is there a way to quickly update the compatability? As far as I know, when I change the zip and update ps_version_compliancy, the module will be disabled in the shop until it is verified again by the addons team. And of course, I would like to keep the downtime as minimal as possible
  7. So I've submitted my second paid module to the prestashop Add-Ons store in July. It took more than a month until I received a message ; the module was declined, because apparently, it did not show a success message after installation. Since I could not reproduce the problem with my prestashop installation, I made a screenshot of my success message, sent it to the addons team and inquired about the version they are using for testing. This is now more than a week ago, without any response. Prestashop makes a lot of money with the add-ons store as they keep 30% of every sale. Why does it ages before modules are even tested and is it so hard to get a response from them? Do other developers have the same experience?
  8. I ran into the same problem today and found that one of the products in the cart only had a carrier selected which was not assigned to the region of the customer. Up to dat moment I hadn't even realized that you could also assign carriers to specific products.
  9. I know this topic is already a few months old, but maybe someone encouters the same problem. I solved it by editing product-list.tpl and changing {$product.description_short|strip_tags:'UTF-8'|truncate:360:'...'} (around line 45) to {strip_tags($product.description_short,'<br>')|truncate:360:'...'} This strips everything except the newlines.
  10. Yes, the new products module is enabled, but I tried the changed version of Product.php which was in the other topic. And I had all of the products in one large category. It was not really meant for browsing, but mainly for customers to be searchable (contains mainly spare parts). So it would be advisable to divide the products into multiple subcategories of the containing category? Which is a suitable size of products per category then? Also, this is prestashop 1.2.5, are there any performance upgrade for 1.3? Thanks for the help, love Prestashop so far, but this is giving me a headache....
  11. Thank you for these links. I tried some of the workarounds ,and also managed to identify some other slow queries , but presta kept being slow (faster than before, but not really user- or serverfriendly). I ended up deleting all of the newly imported products from the database...
  12. Last night, I ran an import with roughly 250.000 products. The import finished successfully, but ever since, the prestashop mysql queries have been eating up all the server's capacities, and the account has been banned about an hour ago (the import finished some 10 hours ago...), as it was slowing down the rest of the websites on the server. Does anyone know whether prestashop can handle these large amounts of products? Is there anything that I can do to speed up presta in order to get the account un-banned, other than deleting all the products from the database? Thanks a lot in advance !!
  • Create New...

Important Information

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