Bootstrap “Read More”

My customer’s glasses shop based on Magento 2.3, using Bootstrap 3 based theme. Here is a method to add “Read More…” at this glasses shop. Here is the basic code: <div> How to buy eyeglasses online? <a class=”hook in” data-toggle=”collapse” href=”.hook” aria-expanded=”false”>read more</a> </div> <div class=”collapse hook”> It will save you a lot if you […]

How to Add FAQ Schema at Each Category of WordPress?

Simple method, we can add our FAQ code in a category description. Step A: Install the plug-in which is named “HTML in Category Descriptions“,  and activate it, then we can add schema code in the description block. Step B There are 2 methods for FAQ Schema code: JSON-LD, and Microdata. Let me share the 2 […]

How to add different custom text at different Category of X-cart 4.7?

Edit /skin/reboot/customer/main/subcategories.tpl, add the following codes at the proper place: {if $current_category.categoryid eq “1”} <div class=”details-summary-accordion” itemscope itemtype=””> <details class=”my-1″ itemscope itemprop=”mainEntity” itemtype=””> <summary class=”h4 bg-light border rounded px-3 py-2″ itemprop=”name”>How to Order the Best Fashion Safety Glasses?</summary> <div itemscope itemprop=”acceptedAnswer” itemtype=””> <p itemprop=”text”>When you look for a new pair of eyeglasses, chances are that […]

Magento 2.3 Generate Thousands of Files, How to Delete Them?

After we run Magento 2.3 for 3 months, we found there are thousands of files under pub/media/captcha/base, more than 2Gb.  When I use rm -rf * to run these useless files, I got an error message, we can use the following method to delete them: cd pub/media/captcha/base du -sh ./ find . -name ‘*png’ -print0 […]

How to Set Default Post Title?

Modify the file named functions.php which is under your theme, add the following code at the file: //Default Post Title function my_default_title_filter() { global $post_type; if (‘post’ == $post_type) { return ‘Eyeglasses ‘; } } add_filter(‘default_title’, ‘my_default_title_filter’); Here the default post title will be ” Eyeglasses” when you post a new  post.

How to Install Magento 2.4.1 under Aliyun Centos 8?

1 Upload to your host, and unzip it. 2. find . -type d -exec chmod 777 {} \; && find . -type f -exec chmod 777 {} \; chmod u+x bin/magento 3. export PATH=$PATH:/home/wwwroot/default/bin 4. php bin/magento setup:install –base-url= \ –db-host=localhost –db-name=cheapglasses –db-user=eyeglasses –db-password=’prescriptionglasses’ \ –admin-firstname=eye –admin-lastname=care – \ –admin-user=sun –admin-password=eyewear –language=en_US \ –currency=USD […]

How to Setup Redis for Magento 2.4?

After we successfully installed Redis, if we run: redis-cli We will get the following errors: -bash: redis-cli: command not found Run the following command, and we will find the location of the command of redis-cli which redis-cli /usr/local/redis/bin/redis-cli Just add ‘/usr/local/redis/bin’ to Environment Variables in Linux How to Set and List Environment Variables in Linux? […]

How to Install ElasticSearch, Magento 2.4.1 Under Aliyun Web Host Centos 8?

By default, ElasticSearch 7 is needed for Magento 2.4. So we should install ElasticSearch 7 before we install Magento 2.4. First Step, Check JDK is install or not, if not, install Install the JDK on CentOS. We cannot install ElasticSearch 7 directly, we should check JDK on CentOS in installed or not, I run CentoOS […]

How to Install Magento 2.3.6 Under Aliyun?

I use lnmp, and installed ngix, php7.3, mysql5.7 for Magento 2.3.6 First, Copy conf/example/magento2-example.conf, and rename it to magento2.conf, and put it under conf/vhost; Second, Upload magento-ce-2.3.6-2020-09-25-06-30-58.tar.bz2, and run tar -jxvf magento-ce-2.3.6-2020-09-25-06-30-58.tar.bz2 Third? find . -type d -exec chmod 777 {} \; && find . -type f -exec chmod 777 {} \; chmod u+x bin/magento […]