Jump to content

Toeareg

Members
  • Posts

    79
  • Joined

  • Last visited

Profile Information

  • Location
    Netherlands
  • Activity
    Project Owner

Recent Profile Visitors

3,894,056 profile views

Toeareg's Achievements

  1. Let me first make clear that I am not using 1.7 myself, but I am investigating if I should upgrade to a newer version. During my testing I ran into several order-out-of-stock related problems. Some of the following cases might also apply to your situation: 1. When a payment is interrupted and the customer returns to the shop before doing the actual payment, the order is considered "Cancelled" which is correct. BUT. the amount that was ordered is added to the available stock, which is NOT correct if you allowed order-out-of-stock. Let's say you have 1 item in stock, but the customer ordered 2, then after the order is cancelled, your available stock will be 2 according to PS. 2. When a payment is interrupted without the customer returning to the shop, then you get an order waiting for payment, but your stock is already adjusted (2 pieces ordered, 1 from stock + 1 from out-of-stock) and you will have -1 in stock according to PS. So you might check if any of such cases apply to your situation. Especially check what happens with your stock at what precise moment.
  2. Which moderator moved this thread to this forum? My question has NOTHING to do with upgrading PrestaShop, so it is completely out of place here!!! It is about a problem introduced by a MySQL update on our server! I just noticed that the thread had been moved. It was originally posted in "International community (English) > General topics". The problem is still not solved, so I would appreciate it if it could be moved back to the General Topics forum please. Edit Jan. 27. Thank you for putting the thread back here in the forum where it belongs
  3. I have created a module that will allow Order Out Of Stock products, but the quantity is maximized by the available stock at our suppliers. So if we have 2 items in stock and the supplier has 5, then you cannot order more than 7 items. This all works great, but .... The suppliers are located in different countries and therefor have different delivery times. They can vary from 3 - 12 days depending on the supplier. So I want to inform our clients about the delivery time they should expect if they order products. If a product is added to the Cart, it's no problem to show the delivery time for that product in the Cart. But I want to show that info before they put it in their Cart. However, if you just open a product page or change the size of the current product, the id_product_attribute of the currently selected size is unavailable. At least the smarty debug screen doesn't show the actual id_product_attribute. So how do I get the currently selected id_product_attribute?
  4. MySQL on our server was updated from version 5.5 to 5.6 last weekend and that made our website incredibly slow. With MySQL 5.5 our main category page loaded in about 2-3 sec. But now, running MySQL 5.6, the same page takes about 16-20 sec. We activated "Slow Queries" and found that the problem is caused by blocklayered. More precisely the query that handles attribute groups. If we disabled that query, the page loads again in 2-3 sec. For the time being, I adjusted the filters in blocklayered, so that the attribute groups are not used as a filter. That has the same effect as disabling the query in the source. This is the query I am talking about: SELECT COUNT(DISTINCT p.id_product) nbr, lpa.id_attribute_group, a.color, al.name attribute_name, agl.public_name attribute_group_name , lpa.id_attribute, ag.is_color_group, liagl.url_name name_url_name, liagl.meta_title name_meta_title, lial.url_name value_url_name, lial.meta_title value_meta_title, psi.price_min, psi.price_max FROM ps_layered_product_attribute lpa INNER JOIN ps_attribute a ON a.id_attribute = lpa.id_attribute INNER JOIN ps_attribute_lang al ON al.id_attribute = a.id_attribute AND al.id_lang = 7 INNER JOIN ps_product as p ON p.id_product = lpa.id_product INNER JOIN ps_attribute_group ag ON ag.id_attribute_group = lpa.id_attribute_group INNER JOIN ps_attribute_group_lang agl ON agl.id_attribute_group = lpa.id_attribute_group AND agl.id_lang = 7 LEFT JOIN ps_layered_indexable_attribute_group_lang_value liagl ON (liagl.id_attribute_group = lpa.id_attribute_group AND liagl.id_lang = 7) LEFT JOIN ps_layered_indexable_attribute_lang_value lial ON (lial.id_attribute = lpa.id_attribute AND lial.id_lang = 7) INNER JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) INNER JOIN `ps_layered_price_index` psi ON (psi.id_product = p.id_product AND psi.id_currency = 1 AND psi.id_shop=1) WHERE a.id_attribute_group = 1 AND lpa.`id_shop` = 1 AND product_shop.active = 1 AND product_shop.`visibility` IN ("both", "catalog") AND p.id_product IN ( SELECT id_product FROM ps_category_product cp INNER JOIN ps_category c ON (c.id_category = cp.id_category AND c.nleft >= 4 AND c.nright <= 5 AND c.active = 1) ) GROUP BY lpa.id_attribute ORDER BY ag.`position` ASC, a.`position` ASC; If I run this query in PhpMyAdmin on our server it loads incredibly slow (15.55 sec for only 84 results). Running the same query on our test server with MySQL 5.5 only takes 0.43 sec!!! So now the main question: What in this query can cause such a huge difference in loadtimes? Thanks for any help.
  5. Thanks Razaro, but the ETS guys are already working on the problem, so I will just wait for their answer/solution.
  6. I left it running overnight but now, after more than 15 hours of running, there is no change in the progress, nor any error message. Any ideas?
  7. Thanks for your reply, but I'm afraid it isn't of any help so far. I have set the variable as you requsted: @ini_set('display_errors', 'on'); I started the migration run again. Like yesterday, everything works just fine up to step 5 (see the attached screenshot). It is at 27.56% and seems to have frozen there with no change for almost 2 hours now. And sadly no error messages either. Or do I need to check a log file somewhere? Cheers, Matt
  8. Hi, I'm running into problems migrating from PS 1.5.4.1 to PS 1.6.1.24. I downloaded the latest version of the migration module (1.1.8). First I tried the migration option with the direct URL connector method. That process run fine up to 27.64% of the products import and then stalled. The `ps_product` table is complete BTW (11586 products) but the other products related tables are empty or incomplete. After waiting for almost 2 hours, it was still at 27.64% so I aborted the import. I the restarted and chose to resume the import which started at 27.64% as it should, but nothing happened after that. Then I tried to use the file download/upload option. That started properly, but it's now at 26.14% for over an hour, so I am pretty sure the process is stalled. Any suggestions what I could do to get this working?
  9. I am using PS 1.5.4 Prestashop offers the option to create a copy of a product, but it will assign a new id_product based on the next AUTO_INCREMENT. I would like to overrule that and use a custom id_product. Can anybody give me a clue where I should tap into the software to force my own custom id_product before the actual copying starts? Thanks for any help.
  10. I noticed another typo: WHERE `id_product` = \''.$row->id_product.'\. should be WHERE `id_product` = \''.$row->id_product.'\' $sql = 'UPDATE `'._DB_PREFIX_.'stock_available` SET `quantity` = ( SELECT SUM(`quantity`) FROM `'._DB_PREFIX_.'stock_available` WHERE `id_product_attribute` > 0 AND `id_product` = \''.$row->id_product.'\' ) WHERE `id_product` = \''.$row->id_product.'\' AND `id_product_attribute` = 0 ;';
  11. You are correct about the additional WHERE clause, but remove the semicolon just before the WHERE: $sql = 'UPDATE `'._DB_PREFIX_.'stock_available` SET `quantity` = ( SELECT SUM(`quantity`) FROM `'._DB_PREFIX_.'stock_available` WHERE `id_product_attribute` > 0 AND `id_product` = \''.$row->id_product.'\' ) WHERE `id_product` = \''.$row->id_product.'\. AND `id_product_attribute` = 0 ;';
  12. Just looked at it again and i think you overdid it a bit in the nested selects. Didn't test it, but I think this should do: $sql = 'UPDATE `'._DB_PREFIX_.'stock_available` SET `quantity` = ( SELECT SUM(`quantity`) FROM `'._DB_PREFIX_.'stock_available` WHERE `id_product_attribute` > 0 AND `id_product` = \''.$row->id_product.'\' );';
  13. Look at the parentheses in your query: $sql = ('UPD.....duct.'\') ');
  14. I have created a hack to add in a second stock level for all products. That's the stock currently available from our supplier. The stock level is automatically checked/updated twice a day and stored in it's own dedicated MySQL table. We do allow for ordering out-of-stock products, but only as long as we can re-order them from our supplier. That gives us 4 possible product statuses (shown on product page): - product in stock in our store (delivery time 1-3 days) - product available from supplier stock location A (delivery time 4-6 days) - product available from supplier from stock location B (delivery time 7-10 days) - product no longer available from supplier (out of stock message) Now I would like to also show this message in the shopping cart and in the confirmation email. B.t.w. we use single page checkout. I have no experience yet in working with the order and cart classes, controllers and modules and because this part of the software looks quite extensive I would love to get some tips. Is there any technicaly versed person here who can advise me on the follwing: - what would be the best place to do the request about the supplier stock - what's the best place to add the delivery time message so it will show up in the cart & the confirmation email Thanks for any help
  15. You need the SUM of all rows where `id_product_attribute` > 0 (not = 0)
×
×
  • Create New...