Magento 2 commerce cloud – Custom less not applied on listing page

I have created a custom theme, for the listing page i have created custom less file,

appdesignfrontendZeromy_themeMagento_Catalogwebcsssource _custom_listing_page.less

On the Website listing page my _custom_listing_page.less not working.

I have declared my _custom_listing_page.less in appdesignfrontendZerosleepworldmy_themelayoutcatalog_category_view.xml

<head> <css src="Magento_Catalog::css/source/_custom_listing_page.css" rel="stylesheet" type="text/css" /> </head> 

submitted by /u/aveeva7
[link] [comments]

M2 – How to change Wishlist icon color after product added to Wishlist

My code:

appdesignfrontendZeromy_themeMagento_Wishlisttemplatescatalogproductviewaddtowishlist.phtml

<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ // @codingStandardsIgnoreFile /** @var MagentoWishlistBlockCatalogProductViewAddToWishlist $block */ ?> <?php if ($block->isWishListAllowed()) : ?> <?php $_product = $block->getProduct(); ?> <?php $isAdded = $this->helper('MagentoWishlistHelperData')->getWishlistItemCollection()->addFieldToFilter('product_id', $_product->getId())->count(); ?> <?php if($isAdded): ?> <a href="javascript:void(0)" class="action towishlist already-added" data-action="add-to-wishlist"><span><?= $block->escapeHtml(__('Added to Wish List')) ?></span></a> <?php else: ?> <a href="#" class="action towishlist" data-post='<?= /* @noEscape */ $block->getWishlistParams() ?>' data-action="add-to-wishlist"><span><?= $block->escapeHtml(__('Add to Wish List')) ?></span></a> <?php endif; ?> <?php endif; ?> <script type="text/x-magento-init"> { "body": { "addToWishlist": <?= /* @noEscape */ $block->getWishlistOptionsJson() ?> } } </script> 

CSS:

appdesignfrontendZeromy_themeMagento_Wishlistwebcss_extend.less

.action.towishlist.already-added{color: #ff0000 !important;} 

After item added to wishlist the wishlist icon color not update.

submitted by /u/aveeva7
[link] [comments]

Magento 2.4.2 Released [February 09, 2021]

Magento 2.4.2 version released on February 09, 2021, that offers platform enhancements with security and performance improvements.

Release Notes:

  1. Magento Open Source 2.4.2 Release Notes
  2. Magento Commerce 2.4.2 Release Notes

Highlights of the latest Magento 2.4.2:

  • Support for SameSite attributes for cookies.
  • Supports Elasticsearch 7.9.x and Redis 6.x
  • Includes Adobe Stock Integration v2.1.1.
  • Facilitates using the web-optimized images in the content
  • Adobe Stock Integration v2.1.1.
  • Enhanced PWA Studio

Read more at https://meetanshi.com/blog/magento-2-4-2-release/

submitted by /u/Meetanshi
[link] [comments]

M2.3.6 developer to production – correct steps

I use Magento 2.3.6 and am getting ready to go live… But got a little confused about the correct steps as I keep finding different instructions in different places…

So in order to switch from developer mode to production, do I need to manually delete any folders first?

Is this one command ( php bin/magento deploy:mode:set production ) enough to take care of everything?

Or should it be something like:

php bin/magento deploy:mode:set production –skip-compilation

php bin/magento setup:upgrade

php bin/magento setup:di:compile

php bin/magento cache:clean

php bin/magento cache:flush

php bin/magento setup:static-content:deploy -f

Hope someone can help.

submitted by /u/rrovorr
[link] [comments]

Full Page Cache products in multiple categories

Hey there everyone,

I have an issue I am trying to solve regarding caching. I have products that are in multiple categories and whichever one is visited first is the one that’s cached. When navigating to the same product but in a different category it is pulling the cached version and not from the current category it is in. This is leading to design errors and issues of that nature as we have some styling per category and if it’s pulling the cached category and not the category it’s currently in then the design gets all weird.

Would anyone either know how to check if the page is in the correct category you are navigating to so i can bypass the cache if(cached_page_category_id != requested_page_category_id) or if you can save the page cache based off the category id and pull based on the category id?

Thanks for all the help

submitted by /u/jdtaylor11
[link] [comments]

Place order for a different userID? Something like this even possible?

Hi M2 experts, I have a difficult question. I need to implement a sub account system in my shop where certain accounts can create sub accounts. I guess that would be possible but here comes the tricky part:

If the sub account places an order, the order needs to go into the main account (except the shipping address).

I was thinking about something like this:

  • Main account is “customerID=1”
  • Sub account is “customerID=2” and has a custom customer attribute of “isSubaccountOfCustomerID=1”

Before placing the order, I would check if customer is a sub account. If yes then check from which main account (“isSubaccountOfCustomerID=1”) and place the order for this customerID.

I wonder if this (or something like this) is even possible in Magento 2. If yes, how could a plugin for this look like?

Any help is really appreciated. Thank you very much.

submitted by /u/hardy123480
[link] [comments]

After a dozen convos with r/Magento giving feedback on my free “look up any company’s suppliers” tool, E.x. Who makes Uniqlo Jeans’s?, I’ve made 125+ changes to ImportYeti and am happy to announce ImportYeti Beta V3.0

Here is the link to the original post.

You can find the tool here: ImportYeti.com

For those who missed the earlier posts, ImportYeti searches 70,000,000 public shipping records to help you find a quality supplier 1000x times easier than Alibaba alone. You answer questions like:

  • Who makes Fire Mountain’s metal beads? Answer: Guangzhou Tat Metal Works
  • I thinking of buying barbells from Nantong Leeton Fitness Co., the #1 ranking company on Alibaba for the term “barbell”. Is Nantong Leeton Fitness Co. the right supplier for barbells? Answer: No. They are a big company but primarily sell resistance bands. Thus, they likely outsource their heavy metal work creating a more costly and potentially worse product.
  • Who are the top companies & suppliers who import/export under HS Code 42.02.92 — trunks & suitcases?

I want to thank a dozen redditors from r/Magento who gave feedback on ImportYeti so far. It made a crazy difference. It really helped me understand how people actually use the tool and what needs to change. Over the past 90 days, I’ve completely re-done our HS-Code explorer, the hs-code sections on the company/supplier pages, added more search filtering options, fixed around 30 usability issues, fixed some janky technology choices I made in the beginning, fixed around 50 bugs and added a basic user management system to cut down on the expensive site scraping and lay the groundwork for csv export and “save a company” features that should be live for beta V4.0.

I’d love any and all feedback (love or hate)… no matter how brutal, small or crazy : ) I only want to create things that people really love. If you enjoyed this tool, have feelings on the monetization strategy, have any ideas for how to improve it, or found a bug/usability issue, I want to hear from you. Please PM me or comment below anytime

submitted by /u/ImportYeti
[link] [comments]

My boss started doing tutorials on youtube – a great watch for beginners and Magento vets

https://www.youtube.com/channel/UC1sw8JiCquPamqlBDmFYB9w

Sorry if this seems like a shameless advertisement from my end, but I genuinely believe these videos are a great educational starting point for a-lot of fledgling Magento Devs out there.

A little context: I’ve been lucky enough to be his apprentice for about two years now, so the fact he’s condensing what he’s taught me into some well edited youtube videos is a great opportunity for anyone out there wishing to start and learn!

submitted by /u/Capes97
[link] [comments]

Redis issue when editing products in Magento 2.3

Hello, non-techie here. Lots of detail – questions at the end.

I recently (September 2020) migrated from Magento 1.9 to 2.3. Within about 6 weeks, I started getting Redis error messages when editing products. I get the following error message when I go to save after editing a product: Notice: Redis::exec(): send of 8192 bytes failed with errno=32 Broken pipe in /chroot/home/afd62225/SITE.com/vendor/colinmollenhour/credis/Client.php on line 1119

Note: I have BSS Commerce Magento 2 Product Grid Inline Editor installed which I use to edit inventory qty, enable/disable, SKUs, etc. However, it cannot be used to add new products or change in-stock status.

Once I get the error message, I cannot do anything with products EXCEPT within the Product Grid Inline Editor until my hosting company clears it out. I can still update items in the Grid Inline Editor but cannot change in stock status, change categories, edit the description, add new products, etc. This tends to go on for days, even as much as a week.

I host my site on Nexcess. My tech people who migrated me say it is a hosting issue. There have been multiple explanations from Nexcess for the error:

a. I am getting the error incorrectly: Reviewing the memory usage, peak memory used was 2.3G out of 3.0G. The max memory usage was 80%. $ redis-cli -s /var/run/redis-multi-afd62225.redis/redis.sock info memory| egrep “peak_|human” | grep -v system used_memory_human:1.88G used_memory_rss_human:2.12G used_memory_peak_human:2.36G used_memory_peak_perc:79.98% used_memory_lua_human:37.00K maxmemory_human:3.00G So we are not sure what is causing this error, as there is available memory.

b. That it was a set up issue: When the domain was changed to SITE.com the path in the cron had not been changed.

c. That there was another set up issue: The task to clear out invalidated indexes has not been running. This allows the page cache index keys to grow indefinitely until eventually consuming all of the Reds memory.

d. That I need to change the page cache to Varnish, which I may have to do for an additional $20+ per month: Given that the issues with Redis are being caused by your page cache, I would also recommend transitioning the page cache to Varnish. Varnish has many advantages over Redis when used for page cache. Additionally, this will reduce usage of redis to only backend cache and sessions, which would further alleviate issues regarding Redis memory usage.

They are now saying this is a known issue in 2.3.4 that is fixed in 2.3.5. My tech team wants to charge $600 to upgrade my brand new Magento 2 store.

Questions:

  1. Anyone have this issue and know what causes/fixes this?
  2. Will Varnish or upgrading to Magento 2.3.5 REALLY fix it or am I throwing money away?
  3. If so, upgrading, is $600 a decent price?

Thanks!

submitted by /u/Dangerous-Rabbit-781
[link] [comments]