Blog

We write about technical solutions for the roadblocks we face in everyday work and more on trends in technology. This will help some of you to tackle issues quickly and get some useful tips.

Setting the ‘continue shopping’ URL to last product’s category page in magento

Here is a code snippet for setting the ‘Continue Shopping’ location to the category listing page of the last product added to the cart. Open the template/checkout/cart.phtml file in your active theme. Place the following code in the foreach loop

(ie. after this line of code)

< ?php foreach($this->getItems() as $_item): ?>

that generates the products list in the cart.

< ?php
$_categories = $_item->getProduct()->getCategoryIds();
$_category = Mage::getModel(‘catalog/category’)->load($_categories[0]);
$url = $this->getUrl($_category->getUrlPath());
Mage::getSingleton(‘checkout/session’)->setContinueShoppingUrl($url);

?>

You are done!

Are the product images not appearing in Magento after installation or migration?

This is a common issue that many Magento 2 users face, and there are several possible causes and solutions for it. Here are some of the most common ones: The product images are not in the correct directory or have incorrect permissions.  You should make sure that your product images are located under pub/media/catalog/product/ in your Magento 2 installation, and that they have the correct permissions (755 for directories and 644 for files).  The product images are not resized or regenerated properly. It would help if you run the command bin/magento catalog:images: resize in your Magento 2 root directory to resize and regenerate the product images ...

Why is the new theme not appearing in Magento 2 after installation?

You did a successful Magento installation, the base theme is showing up and you are all good to go. Then you uploaded your theme and updated it from the Magento backend. Still, it’s not showing up. This is a problem that might eat up some of your time. Usually, a straightforward solution will fix it.

Once you’ve created the theme in the right folder, just run these commands: 

php magento cache:clear

php magento setup:upgrade 

php magento setup:di:compile and 

php magento setup:static-content:deploy --theme {vendorName}/myTheme2

That should do it!

How can products be assigned to multiple stores programmatically in Magento 2?

Let’s say you have a Magento multi-website/store installation and you want to assign the products of a particular category to the new store. I wrote a few lines of code to accomplish this. <?php use Magento\Framework\App\Bootstrap; require __DIR__ . '/../app/bootstrap.php'; $bootstrap = Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->getObjectManager(); $state = $objectManager->get('Magento\Framework\App\State'); $state->setAreaCode('frontend'); $categoryIds = [41]; // Category IDs whose products you want to assign foreach ($categoryIds as $categoryId) { $category = $objectManager->create('Magento\Catalog\Model\Category')->load($categoryId); $productCollection = $category->getProductCollection(); foreach ...

Best Ecommerce Platform for Furniture Stores in 2024

In the year 2024, the furniture market worldwide is expected to achieve revenues of about US$765.00 billion. Online furniture buyers are on the increase. As a furniture store owner, it is crucial to choose the right ecommerce platform. The process of choosing the right digital storefront for furniture is hard yet important. If you don’t have an online store for furniture means potentially losing a wide customer base and thus not making money.  If you already have an online store, an oversight of critical features that are small yet hit the point, can mean losses in sales and dissatisfaction by customers. Building a strong online presence is what keeps the furniture industry competitive and calls attention to today's...

Best Ecommerce Tools to Scale Your Business in 2024

Best Ecommerce Tools to Scale Your Business in 2024

Online shopping is taking off, growing fast and becoming more popular by the day! Nowadays lots of people buy stuff on the internet. Even regular stores are focusing more on their online shops. To stay ahead in this competitive online world, you need certain tools that make running your online business easier. These tools are really important for growing your business and staying successful in the always-changing online market. Ecommerce tools are significant in scaling your business and You need certain ecommerce tools that are vital for success in the ever-evolving online marketplace.  Best 15 Ecommerce Tools to Scale Your Business in 2024

Best Ecommerce Platform for Clothing Stores in 2024

Best Ecommerce Platform for Clothing Stores in 2024

The number of online shoppers has climbed by 40% in the last five years. The search for clothes has shifted from manual to online. Shopping for clothes online is now a convenient process. Online clothing stores offer a range of features, including AI visualization, detailed size information, style guides, and personalized recommendations, to enhance the shopping experience. As the percentage of online shopping increases, clothing stores must first select an eCommerce platform suitable for their brand. It is essential to have an eCommerce platform that is easy to navigate and provides a smooth customer experience. Try going through this

Product Page Optimization: Best Practices for Ecommerce

Product Page Optimization: Best Practices for Ecommerce

In the busy world of online shopping, more than 26.5 million websites are trying to get noticed every day. This means there's a lot of competition! To stand out and sell more, it's super important to make your product pages as good as they can be. That's what we'll talk about here – how to make your product pages top at maximizing sales. But first, let's understand what product page optimization means. What is Product Page Optimization? Why is it important? Product page optimization is the process of improving various elements of a product page on an e-commerce website. Product page optimization is important bec...

How to Build a Successful Ecommerce Website: The Complete Guide 2024

How to Build a Successful Ecommerce Website: The Complete Guide 2024

Online shopping is more than just a trend; it's a revolution. It's changing the way people buy and sell things, and it's opening up new possibilities for businesses of all sizes. But to succeed in this digital world, you need more than just a website. Whether you're a seasoned entrepreneur or just dipping your toes into the online market, a well-designed e-commerce website serves as your digital storefront. Building an e-commerce website can be challenging, but it can also be rewarding and profitable. As we look ahead, the significance of establishing a robust online presence becomes even more evident. By 2026, a striking 24% of retail purchases are expected to take place online. This statistic underscores the accelera...

Best Shopware Development Agencies

Best Shopware Development Agencies

Shopware is arguably the most popular e-commerce platform loved by many online store owners. Owing to its versatile functionality, customizable nature, user-friendly approach, and many other features, Shopware has seen a steadily increasing demand. Though said to be easy to use, implement, migrate, etc. it is always advisable to enlist the help of experienced Shopware developers to begin or transition towards an online store platform. In this blog, we will discuss what is Shopware and a list of the best Shopware development companies in India. What is Shopware? If you are still unaware of what

Page 2 of 3123
2hats Logic HelpBot