Entries by admin

Enable AJAX Submit in GravityForms in wordpress

Enable AJAX Submit in GravityForms in wordpress To enable AJAX form submission in Gravity Forms on your WordPress site, simply navigate to the form settings and enable the AJAX option. This allows users to submit forms without a page reload, enhancing user experience and improving performance. To activate AJAX, use the shortcode [gravityform id=”1″ ajax=”true”], […]

How to enable error reporting in Magento2

How you can enable error reporting in magento2 : Connect FTP OR login into cpanel account and go to the following directory pub/errors find the local.xml.sample and rename to local.xml and also on magento root folder find index.php and put the display error code at the bottom error_reporting(E_ALL); ini_set(‘display_errors’, 1);

Change woocommerce price position

If want to change the position of the price in wocommerce then this is possible. You can it easy in adding little code in the functions.php file. If you want to put price near add to cart button then please add following code to Functions.php file of your child theme (or parent theme, if not […]

Show only single category posts on WordPress archive page

To display only a single category’s posts on a WordPress archive page, you can modify your theme’s functions.php file or create a custom template. The best approach is to use the pre_get_posts hook, which allows you to filter the query before WordPress retrieves posts. Here’s an optimized way to do it: function filter_archive_by_category( $query ) […]

Magento2 admin account disabled error

Magento2 admin account disabled error: Hello All, If you get issue something below on the Magento2 login page     Simply below query to database via phpmyadmin. Example is for reset password for admin user. UPDATE admin_user SET password = CONCAT(SHA2(‘xxxxxxxxNewPassword’, 256), ‘:xxxxxxxx:1’) WHERE username = ‘admin’; NewPassword : Replace it with your password.   […]

Get Magento catalog image

Today  I will show you how you can get the magento catalog image via code on any page. Please use below code and you will be done!!   Mage::helper(‘catalog/image’)->init($product, ‘thumbnail’)->resize(100);

Exclude a category id from category collection in Magento

Please use the below code for exclude a category id from category collection in Magento <?php $allCategories = Mage::getModel(‘catalog/category’) ->getCollection() ->addAttributeToSelect(‘*’) ->addAttributeToFilter(‘level’,2) ->addAttributeToFilter(‘entity_id’, array(‘nin’ => 69)) ->addIsActiveFilter(); ?>

Get Categories and Its Sub Categories in Magento

Get Categories and Its Sub Categories in Magento: To retrieve categories and their subcategories in Magento, you can use Magento’s built-in repository classes and helper functions. Using the Magento\Catalog\Model\CategoryRepository and Magento\Catalog\Model\ResourceModel\Category\CollectionFactory, you can efficiently fetch category data, including subcategories, in a structured way. Here’s a basic approach: use Magento\Catalog\Model\ResourceModel\Category\CollectionFactory; use Magento\Framework\App\State; class CategoryHelper { protected […]

How to Remove SID query from Magento URLs

We will apply the site redirects technique for this issue . While working on the SEO someone can place a wrong link to some forum or blog. We don’t want those links to lead to improper URL and we don’t want SIDs to appear to those visitors. Most important: We don’t want that search engines index the […]