Magento promotions rule gets deactivated - magento

I am using magento on www.gotech.ro, and they have different promotions from time to time. That is why i am using the promotions tab in the admin area, to create price rules (in this case -15%). The problem is that after a while (one day or more), the rule just gets deactivated, even if in admin there is no expiration date set, or it is set sometime in the future. Also, the rule says activated, but on the site, there are the full prices, with no rule applied to them.
I've searched a lot of forums to see a similar problem, but i couldn't find anything. I am using Magento 1.5.1.
Regards,
Vali.

Is the Magento Cron job running every night? In Magento, promotions need to be re-applied every day. This is done automatically by the Cron job. If it is not running, you would see exactly the behavior your describe.

Related

Magento2 - Catalog price rule promotion schedule not working instantaneously

I work on a payment solutions module for Magento 2. We have a customer who is using this module on Magento Enterprise (Adobe Commerce), and this Magento version has the promotion scheduling feature (Catalog price rule): 
(https://docs.magento.com/user-guide/marketing/price-rule-catalog-scheduled-changes.html#schedule-an-update-to-a-catalog-price-rule). 
Currently we are facing an issue related to this feature, because when scheduling a promotion for a product, the discount rule cannot be applied to the cart instantly at the scheduled time. The discount only starts to work a few hours later.
We use the calcProductPriceRule() method of the Magento\CatalogRule\Model\Rule class to get the price with the discount rule applied. We found that within this method, there is the use of Magento cache that could possibly be related to the problem:
https://github.com/magento/magento2/blob/2.4/app/code/Magento/CatalogRule/Model/Rule.php#L503.
I believe it is a problem related to the cache because as I mentioned, a few hours later the discount starts to work and can be applied to the cart normally.
Our customer has already run the commands such as bin/magento indexer:reindex and bin/magento cache:flush to try to clear the cache when creating the schedule, but it hasn't worked.
Does anyone please know if a specific command is needed to clear this specific cache variable? And then ideally we are going to add it to CRON.
Or some other idea of ​​what might be going on?
Please check the priority of the rule you created. Please set it to the highest priority and try again

Magento not creating order for M2Epro Orders

I have implemented M2Epro with magento.
I have used Ebay_Available_quantity attribute to set ebay available quantity.
But there are time where website normal stock is zero and product is out of stock and its still listing on ebay.
When someone buys it on ebay. It does make an order on M2Epro. But does not allow to make order as a magento order.
Is it because it is out of stock or quantity is zero ?
Can we have exceptions for third party sales ?
Thanks
Abhi
We also encountered this issue some time ago and this is what M2e answered on an email:
Thank you for provided details.
I checked your FBA order XXXX and I understand that you
want Magento order creation for FBA orders do not depend on stock
availability.
Let me please explain the logic how Magento orders are created. When
a channel order is imported in M2e Pro, M2e Pro checks settings
provided in Account settings > Orders tab. If corresponding settings
for Magento order creation are provided - M2E Pro sends a request to
Magento to create a Magento order for the channel order.
Magento orders are created due to Standard Magento functionality and
Core Models. Magento does not let to create an order if the product is
out of stock or 'disabled' or does not have available qty in Magento.
These requirements should be met so that the order was successfully
created.
M2e Pro cannot affect the logic of Magento orders creation process.
You can temporarily set 'in stock' status and qty available if you
want Magento order to be created at one for FBA order.
Hope this explanation will be helpful. Please let me know if I can
assist you with something else.
Next email:
Other our customers use backorders feature. As a possible workaround
for creation orders when product quantity is 0, you can allow for
needed products (product should be in stock, manage quantity - "yes".
This will allow Magento order creation for corresponding FBA order if
qty=0. You can set this parameter in Magento product inventory.
I have consulted with our development department on your case. As a
possible workaround, we can provide you with a part of the code which
is responsible for orders functionality. If your developers would be
able to adjust the needed changes, we would be glad to assist you.
Please also note, that we will not guarantee the proper work when some
custom modifications to the code are applied. In case this suggestion
is approved by your developers, please send us your confirmation and I
will send you a part of the code.
The code they wanted to provide was useless, it was just a hint that the magic happens in
app/code/community/Ess/M2ePro/Model/Order.php
public function createMagentoOrder()
which is quite obvious.
Please consider that backorders feature will bring other issues, so we do not use this and currently live with this situation as it is.
For me it is a quite important and standard situation to have FBA stock but no magento stock, so I don't understand why they don't fix the problem.
When time is available we will do a fix ourselves.

Auto add items to cart upon login: default behavior?

John goes to bestwidgets.com and puts 5 red widgets in his cart, logs in then decides not to purchase red widgets and logs out.
John comes back the following day (to the same machine) and decides what he needs are blue widgets. He adds 5 blue widgets to his cart and proceeds to checkout. He then logs in and keeps on trucking thru the one page checkout. Only AFTER he finishes his purchase he realizes that 5 red widgets got automatically added to his cart (when he logged in, though most people wont even realize that).
John now thinks bestwidgets.com are crooks, cancels his order and never comes back.
Am I missing something here or is this magento’s default behavior!??
Magento Community 1.5.1.0
This is the default behavior in Magento, but this has nothing to do with the "Persistent Shopping" feature but with "Quote Life Time". As usual with Magento we left the decision how the store should work to the merchants running the store as they know their market best and what is the best way to configure their store. If you go to System->Configurations under Sales->Checkout in the Shopping Cart tab you should be able to set the number of days the quote (or shopping cart) is remembered (Quote Lifetime (days)). Setting it to 0 should not remember the cart between each login of the customer.
If your using Enterprise: Enterprise_Persistent and/or Community Mage_Persistent disable them via app/etc/modules in the corresponding XML to disable this functionality if your worried about customers not realizing their previous added products are in their cart during checkout.
Am I missing something here or is this magento’s default behavior!??
Yes it is Magento's default behavior. I get your opinion about the crookishness feeling on this, however, I believe most would say it's to help the customers remember what they were looking at and help them spend money. Subtle difference...

Magento Banners frequently loose the link to the related promotion

We have noticed that the shopping cart banners seem to frequently loose the link to the related promotion without anyone making this change within admin. Is there a setting that only allows a certain number of customers to see this banner and then it would be removed? I can’t think of another reason it might just drop the link. It isn’t dropping all the links, and it has usually been the lower value ones.
You need to setup cron.php to be accessed in a cronjob. Verify by hitting cron.php manually and see if that resolves your issue.

reindex Catalog URL Rewrites in magento never ends

I've imported 6K categories and 16K products to magento using a custom import profile.
When I'm trying to reindex everything works except for 'Catalog URL Rewrites' that keep showing PROCESSING but never completes.
log and exceptions files don't show anything.
Is there something I can do to make the index work?
Can I just ignore this index and not use it? (I don't know what it does).
Thanks
You can sort of ignore this index if you do not care about pretty, search engine "friendly" URL's. The products will still appear in the catalog but will have their default "Zend Framework" type URL (/catalog/product/view/id/123)
My store has 150,000+ SKUs in two store views. On my development environment it took almost two weeks to complete.
The best way to determine how fast it is running is to look at the core_url_rewrite database table. It appears that the process starts at product ID 1 in store ID 1 and looks to make sure all of its URLs exist and creates the ones that do not yet exist.
For me the reason it took so long was that it had to go through my entire catalog twice to make all the URLs. One thing I did notice was that this process creates a ton of URLs that are completely unnecessary. In our store easily 90% of our products belong to a configurable product so their visibility is set to "Not Visible Individually" so they never would need to have a URL. This index creates those URLs anyways.
Hopefully this will shed some light on to how this URL works. I would keep an eye on that database table so you sorta know how far the process has come. I would also seriously consider running the reindex process for the command line. I have included a link that explains how to do this (disclosure: it's from my blog)
http://overlycaffeinated.com/2011/02/when-reindexing-in-magento-fails-use-the-command-line/
My own attempt of reindexing URL rewrites was with 10,000 products and it took me like an Hour and Half to finish up.
this link will help you do it from Command Line , which is preferable than doing it from the same Magento admin panel.
http://www.yireo.com/tutorials/magento/magento-administration/340-magento-14-cronjobs
Make sure you read the part about skipping some basic configuration when facing memory limits , this is the one i usually use.
You need catalog URL rewrites to make your catalog work properly. How long are you letting it run for? There's a really substantial amount of data to be written to it...
If you cannot make it work programmatically, it may be possible to shove the data into the table manually and force the index to feel refreshed? Caveat emptor, I have not tried this.
I was encountering the same problem, the server that I am running this on is a FreeBSD server. With the help of the sample of the above code I was able to get the issue to resolve buy running the following command in the shell.
/usr/local/bin/php /usr/local/www/magento/shell/indexer.php --reindex catalog_url
It runs very quickly and resolved my issue. I then created a cron for this to run every 6 hours on my server.
You can reindex using command line it will reduce 75% of load and your magento admin panel working as normal while reindexing.

Resources