by Shoaib Rehman | May 10, 2017 | Magento, Magento 2, Web development
Why does this happen?
This error is normally returned when you remove your Magento theme directly from app/design or vendor/ directory. Removing theme files directly from the directory is not a Magento standard way anymore. Magento 2 has a CLI command to remove themes safely i.e.
Command usage:
magento theme:uninstall [--backup-code] [-c|--clear-static-content] {theme path} ... {theme path}
{theme path}
is the relative path to the theme, starting with the area name. For example, the path to the Blank theme supplied with Magento 2 is frontend/Magento/blank
.
--backup-code
backs up the Magento 2 codebase as discussed in the paragraphs that follow.
--clear-static-content
cleans generated static view files, which is necessary to cause static view files to display properly.
Solution
STEP 1 : File Operations
- Delete the content from
app/design/frontend/<Vendor>
.
- Delete all the content of folder
var/view_preprocessed
& pub/static/frontend
.
STEP 2 : DB Operations
Go to your theme
table and delete the entry for your created theme.
After that…
Go to your core_config_data
table and search for theme
and you will get path records like design/theme/theme_id
replace your default theme id in it. You can run the following command in PHPMyadmin or your database CLI.
SELECT * FROM `core_config_data` WHERE `path` LIKE '%design/theme/theme_id%'
STEP 3 : Flush cache
Flush your cache php bin/magento cache:flush
by Shoaib Rehman | Aug 26, 2016 | Magento, Magento 2
Hi everyone,
After using Magento 1 for a few years, I decided to upgrade one of my clients website to Magento 2 however, it was not an easy task to do as the overall architecture and code base has changed in M2. To be honest, I must say that Magento 2 is much easier to code compared to M1 but it will take a while to understand the structure and code base, and trust me you will face quite a few bugs and errors in the system.
Recently I noticed that on my client’s website, the mini cart stopped working and did not show any products in the popup. As a developer, I knew that the products were added in the system and I tested it by going directly to the checkout page: http://mywebsite.xyz/checkout/cart; so what I did was the following:
- Checked System.log and exception.log files
- Checked browser’s Developer’s network tabs to read the request/response
- Made sure that Magento was up to date because this issue was raised in Magento 2.0 and then Magento fixed it in Magento 2.1
You can check all Magento2 articles here.
After upgrading Magento, the issue was still there so I did the very basic thing; I made sure that caching was disabled and then enabled it. After I enabled the cache, I realised that some of the blocks were invalidated so I flushed the cache storage and tested everything on the frontend again. Everything was normal and read to deploy to the production website.
by Shoaib Rehman | Oct 2, 2015 | Magento, Web development
It’s nearly December and the holiday season is around the corner. Cyber Monday, Black Friday, Christmas and Boxing Day, everything is lined up and I am sure you and many other people are eager to go online shopping for discount prices. According to a survey, the online businesses see more than 100% sales growth during the holiday season and according to National Retail Association, this year the businesses can see an additional 7% to 10% growth.
Whilst the sales numbers are looking good, the most important thing to understand is; whether your web store is capable enough to generate sales for you? What will make your store different than others and give you more business than your competitors? Are you confident you will manage to attract more online customers to your webstore and get a healthy increase in your traffic?
I have compiled a list of 8 important tips which I implemented for one of my clients the for August bank holiday helping them to secure more customers and generate more revenue. Let’s take a look at 8 ways to improve your business in this holiday season.
- Reliable and secure Magento Web hosting
- Good and reliable web hosting is the backbone of your website. Do you think your webstore is hosted with the right people and in safe hands? How good is your server to manage large numbers of traffic? How quick does your server respond to web requests? How good is the web hosting customer support to help you get out of a disaster if the server gets hacked or goes down? Do they offer you 24/7/365 customer support? If your answer to any of these questions is NO, you should migrate the server and move to much more reliable and fast Magento web hosting providers.
- Optimise your store for mobile and smart devices
- Earlier this year, Google announced that Mobile friendliness is one of the SERP ranking factors now and any website which is not mobile friendly will be penalised and pushed down in the SERP rankings. Mobile eCommerce is growing everyday and it grew by 24 percent in 2014 – more than twice the 13 percent growth rate of desktop eCommerce. With over 50 percent of all online shopping customers, it is very important that you do not miss a single lead. Have you seen a downfall in your rankings over the past couple of months? Do you know if your website is responsive? Run the Google Mobile-friendly test to check for yourself.
- Make sure pages load quickly, the faster – the better
- Speed is the key here. Google suggest that the website page load time should be 2 seconds or less. Anything more than that will have a negative impact on SERP rankings. During the busy holiday season, having a slow-loading website and product pages will definitely upset your customers and give them a solid reason to leave your website and abandon their shopping carts. Make sure all your website pages load smoothly with no long delays and use the New Relic extension to analyse the potential performance bottlenecks. Do you need help with your website speed? I am here.
- Make it personal – Do you know what your customers are interested in?
- Do you know what the one thing Google is good at? Personalised search, and that’s the reason we all love Google. Personalising your content and online experience to each individual user according to their history of interests, behaviours, and transactions can increase your sales this holiday season. Make sure you check Magento dashboard and also any other analytics system you have installed to learn what your customers are searching for on your website. Offer them extra discounts based on their transactions history, give them loyalty points and show them what they want to see. Make sure you have enabled Related products on your store. By enabling Related products, you can possibly get an extra 10 percent sales growth.
- Improve and simplify the checkout process – demand less but important information
-
Customers are more likely to abandon their shopping carts during the checkout process when it takes more than a minute to finish the transaction.
Have you noticed how Amazon checkout process works? According to a survey, the average online shopping cart abandonment rate is around
69 percent — a rate you can easily avoid this holiday season by making the checkout process easy, intuitive, brief, and secure. One of the easiest ways to increase your sales is to enable
Guest Checkout. If you are targeting a bigger region and your customers are from different parts of the world, offer them prices in their local currency. From my personal experience I have also noticed that showing a progress bar, only asking for essential personal information, accepting multiple payment options, auto-filling fields when possible, and reinforcing trust with security badges can
increase the sales.
- Integrate social media
- Does your business have a Social Media presence? Do you know during the holiday season customers tend to share their experience on social media more than any other time of the year? I highly recommend integrating social media widgets and let your customers bring more perspective customers to you. Let your customers help you to improve your business. More social media shares = more website traffic and sales.
- Customers love free shipping
- According to Magento’s official blog, shipping was the main reason for shopping cart abandonment last holiday season. Either the shipping cost was too high or Free shipping was only offered on big orders. According to a Comscore study, free shipping drives more sales and gives you an extra edge on your competitors’ websites. Nearly 60 percent of the customers are more likely to add more items to their shopping carts when free shipping is offered on the website. I would highly recommend offering free shipping on all orders if possible.
- Offer exceptional customer support
- Great customer support means more business and sales in the holiday season. Do you know sometimes during the holiday season customers buy what they don’t need? They buy it just for the sake buying. How does your business tackle this situation? Do you have a dedicated online chat support or ticketing system to resolve these issues? Do you offer customer support over the phone? If your answer to any of these questions is No, you need to work on it. From my personal experience, only a happy customer can become a returning customer. If you do not offer good customer support, you are in the red zone.
From Migrating your Magento store to a better web host to integrating social media widgets on your website, you need an expert to do that. Now is the right time to make any changes to your Magento store because I highly recommend not making any changes during the Christmas period. Do you think you need help with your website? Get in touch now and let me help you improve your sales.
by Shoaib Rehman | Jul 8, 2015 | Magento, Web development
Magento 2.0
Magento is one of the best and widely used ecommerce platforms and according to a survey, businesses using Magento had more than £520b worth transaction in the year 2014. In the past few months, Magento experienced hundreds of hacking attempts and some of the web stores were compromised. Considering the severity of this issue Magento released it’s May patched for Magento EE and Magento CE version which helped retailers to secure their store and save the confidential information leakage.
Yesterday Magento released another security patch to address this issue. Magento suggests that although there are no confirmed reports of attacks related to these issues to-date, but it is important that you immediately deploy the patch in order to protect your store.
This patch addresses the following security issues:
- It prevents attackers from posing as an administrator to gain access to the last orders feed, which contains personally identifiable information that can then be used to obtain more sensitive information in follow-on attacks. Check to see if you have been compromised by reviewing your server logs for someone trying to reach the /rss/NEW location.
- It closes a number of security gaps including cross-site scripting (XSS), cross-site request forgery (CSRF), and error path disclosure vulnerabilities.
Magento has created patches for both Magento Enterprise and Magento Community Editions. For Magento Enterprise Edition, a patch is available for Enterprise Edition 1.9 and later releases. For Magento Community Edition, a patch is available for Community Edition 1.4.1 to 1.9.1.1 and is part of the core code of their latest release, Community Edition 1.9.2, which is now available for download.
Do you own a Magento store and looking for someone to help you secure your store and apply the patch? Please Get in touch now
by Shoaib Rehman | Jul 1, 2015 | Magento, Web development
To refund an item in an order, you’ll need to create a credit memo. There are two ways to do this, depending on how the invoice was created.
If the order was placed using a payment method that automatically creates invoices (like PayPal or a credit card gateway in authorize and capture mode), or if it was placed using a method that doesn’t accept any actual payment information (like “pay by check”), you’ll need to click the “Credit Memo” button on the main order information screen to create a credit memo.
If the order was placed using a credit card gateway in authorize only mode, and you created the invoice(s) for the order manually, you’ll need to first click on the invoice that contains the payment you want to refund (under Invoices), and click on the “Credit Memo” button from within the invoice.
In simple words, Refunds are processed offline when the customer paid for the goods using cash on delivery, cheque or any other manual method whereas, online refunds are when the customer paid using their Credit/Debit card via Authorize.net or any other online payment gateway.
To refund the customer, please create an online refund using the following procedure:
- Go to the order details page and click on Invoices from the left side menu. Do not click on Credit Memo whilst the information tab is selected.
- On the invoices tab, click on the invoice # and you will see the invoice landing page
- On this page, now click on Credit Memo to create an online refund
- Fill in the details and the quantity to refund
- Once you are happy with the refund, you will see two buttons at the bottom of the page i.e. Refund offline & Refund. Since it is an online refund so CLICK ON REFUND button. Do not click Refund offline otherwise you will be taken to the offline page again.
Once you have made an online refund now, the transaction will appear in Authorize.net/your payment gateway and the money will be refunded to the customer.
Are you running Magento community edition and would like to refund the money as store credit? Since Magento community edition does not have a default store credit option so check this Store credit extension from MageWorx and get everything up to date.
Looking to buy reliable Magento extensions? Try Xtento Magento extensions.
by Shoaib Rehman | Jun 16, 2015 | Magento
Learn how to fix Destination file or folder not writeable
Sometimes whilst adding new product images you may exprience this error and some times it is not clear as to why this error has occurred. To fix this issue, do the following steps in order and it will resolve it:
- Go to your magento installation directory and open /lib/varien/file/uploader.php
- Search for function ‘public function save($destinationFolder, $newFileName = null)’ or ‘if (!is_writable($destinationFolder))’
- Copy $destinationFolder variable and append it to ‘throw new Exception(‘Destination folder is not writable or does not exists.’)’ so it becomes ‘throw new Exception(‘Destination folder is not writable or does not exists.’.$destinationFolder);’
- Go back to your magento admin panel and try to upload the images again
- You will see the same error but this time the destination folder path will be shown too
- Copy the path, go to your FTP client or SSH and set the file permissions to 777 (it has to be 777 not 775)
- Once done, upload the file back to the server
- Logout from the Magento admin and login again
- Go to the product and this time the images will be uploaded