I have a strange problem in magento. Everything I change in the "Inventory" tab of a product, gets resettet after I click on "save".
Has someone had a similar problem in the past?
Is there a way to simulate the saving progress step by step, so I can see where the error appears?
Until now I have tried to:
Disable all addons
Reindex everything new
Delete the complete cache in backend/via SQL/via ssh
Delete all products and categorys
Sorry for the lack of information. If you need any information please feel free to ask.
Thank you for your help!
Please try below solution may help you
I tracked this down into app/code/core/Mage/CatalogInventory/Model/Observer.php.
The event catalog_product_save_after calls the saveInventoryData method which in turn calls the _prepareItemForSave method.
Around line 225:
$originalQty = $product->getData('stock_data/original_inventory_qty');
if (strlen($originalQty)>0) {
$item->setQtyCorrection($item->getQty()-$originalQty);
}
If you comment out this line:
$item->setQtyCorrection($item->getQty()-$originalQty);
It seems to correct the problem & stock levels now stay correct when saving a product whilst simultaneously creating / canceling an order on both the front & back-end of the website.
I figured out, where the problem was:
I have over 4000+ different product attributes. Everytime I save a product, the information of all 4000 attributes are getting transmitted over post-method. This seems to be too much, and the URL are getting cutted after a fixed value of characters. So the quantity information does not getting transmitted.
Every product has only 1-30 attributes filled with information, the rest is blank. But which attributes are filled depends on the specific product. I have choosen this method of creating an attribute for each information, because I would like to set individuality if information is searchable or filterable.
The solution was to increase max_input_vars in php.ini.
Thank you!
Related
While creating the configuration products in magento2.2.2 I am facing the “Invalid Form Key. Please refresh the page” error. I have google regarding this error and I have found the solution to increase the value of max_input_vars PHP configurable variable. I have increased this value but the problem is not solved.
While creating the configurable product almost 40000 associated product is generated and now I have set the max_input_vars value to 3075000 but the problem is not solved.
Anyone please help me to fix this issue.
Honestly, i don't think you will be able to create 40001 products in
just one time.
Then, associate 40000 products to a configurable one from admin
product page, looks also something hard.
If you have developper skills, I recommend you to script all of this.
Programatically create products is easy.
Btw, you will need to increase php max_excecution_time if you script don't use PHP Cli (When you run php command line, or CRON, there will be no maximum execution time.)
Usually, i run thoses scripts from Magento CRON to keep a 2mn php max_excecution_time.
40,000 variations on configurable product will take too long to load on the admin, besides, are you displaying 40,000 options on frontend to the customer? I suggest you review your solution on this, this is a design issue.
I have a problem. I'm using Woocommerce plugin and I never edited any default file and there's something wrong with the prices shown. I upload the product via the official API with no problems. If I load the products via browser, it shows the wrong prices.
But if I open the product to edit it, it shows the right price.
I don't understand why this is happening as I've never bothered touching any default core files. I'd appreciate it so much if anybody could help me solve this. Thank you very much.
Did you try putting the price like: 15655.00?
In Woocommerce Settings you can set the currency options where the separators are already handled:
i have a problem but with my magento, it's about export price in export/import profile. i've done it by click run profile in popup but after i check in profile page for export price, the date is not modified for the new one. i checked in history, it listed. (attachment). it confuse me when i whan to check the last date for export price. i need to fix it but i haven't got the solution. Really need your help guys..
Magento default settings are awesome and it always display the latest one first basis in default. Without applying a filter the order may not change. It looks like you have filtered it in the basis of either ID or datewise.
Please check it again,
The problem is either error in import/export or issue in the preference of Import/Export Profile. Just create a fresh Import/Export Profile and proceed the same process once again and this will be done. Thanks
I need the add to cart form on each product to display separate quantity fields so items of different attributes can be added at the same time. This is for a photography site, so it makes sense for the customer to order 2 6x4 prints and one 10x8.
Right now the add to cart form is something like this:
Here is a mockup of what I want to have:
I have no idea which hooks to use, or if it's even possible to add multiple product variants in one POST. Is anyone familiar enough with the Ubercart api to tell me how I can go about doing this.
I found this googling for a solution to the same problem. Unfortunately I couldn't find anything.
So I made a patch and sent it in to an issue with a similar request - http://drupal.org/node/782154#comment-3925090
The patch isn't tested very well yet, but I will be going live with it or a subsequent solution in a couple of weeks.
Hope it helps.
OK my client wants to show a buy both feature in the cart, if they have 1 particular item type in the cart they want it to show up for another particular item type so if they buy both they can save $50 off the total. I am trying to wrap my head around what would be the best way to set this up so it couldn't be easily hacked (ie: adding both to the cart then removing one and keeping the discount)
does anyone have some general ideas in theory?
Thanks.
Why not perform the check right before they submit the order? that way, everytime they get to the submit order page, it will check if both items are present.
easy enough - always calculate the final price on the fly based on the current cart contents. The issue you mention seems like it would only be a problem if you were calculating the final price and caching it somehow.
usualy it'd done by creating a new bundle item. It's a bit dirty but works :)
Are they using a system already, or is this a custom job on your part?
Add the discount to the cart and use another table to keep track of the discount's dependencies. Whenever an item is removed from the cart, check to make sure the discount is still valid. If it is, great. If not, remove it and recalculate the cart price.