I am using magento2.3.2. My website product backorder functionality is not working on the frontend.
I have done all steps below:
configure backorder in catalog->inventory- and set the Backorders - allow quantiy o and notify customer
php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush
I have run all the commands but my backend changes do not reflect in the frontend.
Before it was working fine but after migration and enabling varnish cache then issues happen.
So let me know how I can solve this.
To flush the Varnish cache of your Magento store on the command line you can use
/data/web/magento2path/bin/magento cache:flush full_page
This will purge the Varnish cache of the local Varnish instance.
Related
I updated my Magento 2.4.1 installation to 2.4.2 a while ago.
Since then it works as expected. No problems.
But now I discovered that wenn I call magento setup:upgrade the update starts and after all finishes, I can't see the options in my configurable products (sizes, colors,...). They are just gone. I have no clue why.
Before the upgrade
After the upgrade
The configuration options are missing after the upgrade and the console shows me an error which was not present before.
…/static/version1623092606/frontend/Magento/luma/de_DE/configurableVariationQty.js
And I can't find a file called configurableVariationQty.js anywhere on my server. Where does it come from? Should it have been installed with the upgrade?
Does anybody have a clue what’s going on here? How can I gather more information?
If you are running production mode (see bin/magento deploy:mode:show), you need to run bin/magento setup:static-content:deploy after setup:upgrade, as well.
It might also be needed to reindex with bin/magento indexer:reindex.
Tracked it down finally.
This issue helped me find the solution:
https://github.com/magento/inventory/issues/3276
The patch, referenced in the last post (https://github.com/magento/inventory/commit/337f8b7d56d81c217d5bf2bac180b315fd6120d0#diff-669c3cc08f646d82fcfa47b2385c3301fb1ee58c863ab0c91812e9e0482d8569) helped me to solve my problem.
InventoryCatalogFrontendUi/Model/GetProductQtyLeft.php already looked like the patched version in my installation.
But I had to patch InventoryConfigurableProductFrontendUi/view/frontend/web/js/configurable-variation-qty.js in my installation.
After adding the && response.qty > 0 all worked well again.
This error was gone
and the configurable options showed up again.
I installed Magento 2, and then installed a theme but the CSS and JS does not work.
I ran the command: php bin/magento setup:static-content:deploy
But when I visit the frontend it can not find the CSS or JS. I think it is a problem because I do not have en_US locale as default and the theme only comes with this.
So I go back to admin in: Stores > Configuration > General to try and change the default locale, but the dropdown is grayed out.
I tried every possible store view but I can't change it back to en_US.
How do I fix this?
Try this:
php bin/magento setup:static-content:deploy en_US -f
Upgraded to Magento 2.1.9 from 2.1.8.
Steps to replicate:
Deploy in production mode
deploy:mode:set production
Set the following paths to 0 within db:
dev/template/allow_symlink
dev/js/merge_files
dev/js/enable_js_bundling
dev/js/minify_files
dev/css/merge_css_files
dev/css/minify_files
Set the following paths value to 1:
dev/static/sign
Deploy static assets:
php bin/magento setup:static-content:deploy en_AU en_US && php bin/magento c:f
Results
Go to mydomain.com/admin and see:
Inspect this, what do we find:
A bunch of 404s to static minified files, visiting these files in from CLI also confirms they actually don't exist.
I thought that it might be a locale issue, saw this article but this didn't work for me.
I have minification turned off in my settings, all caches cleared (including Varnish). Yet this issue still persists. Front-end appears fine on the other hand.
Any help would be much appreciated, otherwise I suppose I could train the client to edit the db directly!
If you have install magento2.x in your local PC then if you can try to change line #607.
Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink
to
Magento\Framework\App\View\Asset\MaterializationStrategy\Copy
Open your console/terminal, and type these commands
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush
It's working fine.
if you can try it....
I have a dirty fix whilst I continue to look at a more permanent solution. Create a permanent redirect pointing from my custom adminhtml theme - the one that doesn't get deployed to the "Magento" theme which does exist:
rewrite ^/adminhtml/<CUSTOM_THEME>/backend/(.*)$ /adminhtml/Magento/backend/$1 permanent;
In my case I am using nginx. If anyone else is experiencing this issue I hope this will provide a temporary solution for the time being.
Hello when I add an extension to Magento 2 my front-end disappears, but at the back end everything is fine and that extension is working.
I have tried increasing the PHP memory limit in PHP.ini sample and run the command PHP bin/Magento setup: static-content: deployment but the front-end is not working. So please let me know how to solve this issue.
To solve this issue, follow the steps given below:
Step 1- First flush/clean the cache of your magento
For Cache flush using command
magento cache:flush
For Clean flush using command
magento cache:clean
OR
You can also clean and flush cache types in the Magento Admin. Go to System > Tools > Cache Management. Flush Cache Storage is equivalent to magento cache:flush. Flush Magento Cache is equivalent to magento cache:clean.
Step 2- Delete the content of static folder. To delete, follow the given path
MangentoDir > pub > static.
Step 3- Run the static view files deployment tool
/bin/magento setup:static-content:deploy
Step 4- Go to the MangetoDir > pub > error and rename the local.xml.sample file to local.xml.
After going through these 4 steps, refresh the frontend page in browser to get the front-end.
php bin/magento setup:static-content:deploy -f
always works for me when no resources are available
Might be your frontend running in some other language so you need to need to deploy the content on that specific language as well like below example :
bin/magento setup:static-content:deploy en_GB en_US ro_RO
For language code, you can open the console of browser & look for any url which are failing to load, in that url you will be able to find the language code in which your frontend is working.
I have installed magento 2 and it working.I just created the Hello world module and it working now.
My issue was I had called non existing method in execute method.
While trying to get it to work I tried to load the page it shows blank white screen, but no error.
How do I get errors to display in magento2?
Add following code in index.php file :-
error_reporting(E_ALL);
ini_set('display_errors', 1);
Enabling Error reporting in magento2 is little tricky , as magento2 now comes with 3 different modes
Default
Developer
Production
Magento2 by default install in “default” mode and thats why you dont get the error log at the front-end of the site , that can a viewed at magento error log . You may check the complete details over here http://devdocs.magento.com/guides/v2.0/config-guide/bootstrap/magento-modes.html
How to enable developer mode in Magento2
This is must have if you are a developer and building extension and template for magento2 , magento provide a command for this purpose . Login in to your linux terminal and under magento execute
php bin/magento deploy:mode:set developer
and it will enable the developer mode under your magento instance for production mode you can set the mode to production or default .
still if you are experiencing in error reporting
you can give a try by renaming local.xml.sample to local.xml under
pub/errors
There is a place for this. In bootstrap.php, there is:
#ini_set('display_errors', 1);
Just uncomment that.
1) app/bootstrap.php, there is:
#ini_set('display_errors', 1);
Kindly uncomment that.
2) Run below commands
php bin/magento deploy:mode:set developer
php bin/magento cache:clean
php bin/magento cache:flush
To check current mode use:
bin/magento deploy:mode:show
Instead of editing index.php or app/bootstrap.php file, you can also edit the .htaccess file to enable PHP display errors settings.
Write the following lines of code at the end of the .htaccess file present in your Magento2 website's root directory:
## enable PHP's error display settings
php_value display_errors on
## set error display to E_ALL
php_value error_reporting -1
After that,
Open terminal
Go to your Magento's root directory
cd /path/to/your/magento/root/folder
Run the following command to enable developer mode:
php bin/magento deploy:mode:set developer
To check your current developer mode, you can run the command:
php bin/magento deploy:mode:show
Please Put the following code in index.php
ini_set('error_reporting', E_ERROR);
register_shutdown_function("fatal_handler");
function fatal_handler() {
$error = error_get_last();
echo("<pre>");
print_r($error);
}