• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
logo

Tutsplanet

Free Technical and Blogging Resources

  • Home
  • Web Hosting
  • Programming
  • Plugins
  • Write For US
  • News
  • About Us
  • Tools

Magento

Magento 1: Assign/ Remove category from a product.

May 7, 2019 by Editorial Staff Leave a Comment

This tutorial will show how to assign or remove a category from a product in Magento 1. I have used the standalone script, but you can use this in any module. Assign a category to product $productId = 2000; $categoryId = 200; Mage::getSingleton(‘catalog/category_api’)->assignProduct($categoryId,$productId);   Remove a category to product $productId = 2000; $categoryId = 200; […]

Filed Under: PHP Tagged With: Magento

Create customer attribute in Magento 1

May 2, 2019 by Editorial Staff Leave a Comment

This tutorial will guide you through the steps to create a custom customer attribute in Magento 1. My use case was to save a mobile application token against the user for further authentication.  

Filed Under: Programming Tagged With: Magento

Magento extensions, the opportunity has just kicked in for Omnichannel retailing

Sep 13, 2018 by Editorial Staff Leave a Comment

Have you heard about Omnichannel retailing? I am sure you have! In fact these buzzwords are the same which fall in the news again and again, but the lack of knowledge becomes the sole reason to dismiss them. Omnichannel retailing is the new customer demand of a business that is pretty much in talks these […]

Filed Under: Design & Development Tagged With: Magento

Magento 1: How to get the Order Id from Shipping Tracking Id

Jul 26, 2018 by Editorial Staff Leave a Comment

How to get the Order Id from Shipping Tracking Id. This code would work only if the shipment has created.

Filed Under: Programming, Snippets List Tagged With: Magento

How To Start An E-commerce Store Using Magento

Jun 16, 2018 by Yawer Malik Leave a Comment

Gone are the days when Brick and Mortar used to be the only way of doing business. Now, more than ever, an ecommerce stores has become the way to go and almost everyone can now create an online store to market and sell their products and services. Though, the real question is: How to start […]

Filed Under: Programming Tagged With: Magento

Magento 1: Direct MySQL query for create, read, update and delete

May 29, 2018 by Editorial Staff Leave a Comment

In a previous article we have shown how to use direct MySQL raw queries in Magento 1.  We have used read and write adapters to execute normal MySQL queries in Magento controllers, models and helpers. In this tutorial we are  using built in Magento functions to create, read, update and delete records from database. Before […]

Filed Under: Programming Tagged With: Magento, Magento 1.9

How to Create a Module in Magento 2

Feb 11, 2018 by Editorial Staff Leave a Comment

Today’s tutorial are showing how to create a module in Magento 2. When you work in Magento you have to create a custom module at some point. Magento 2 has been around for  2 years now. More people are attracted to Magento’s  powerful features and developing more Magento websites in the eCommerce industry. Magento considered […]

Filed Under: Programming Tagged With: Magento

How do I call a static block inside phtml magento

May 1, 2017 by Editorial Staff Leave a Comment

A static block in phtml file of Magento, sometimes we need to do this kind of functionality. For instance whenever you want to add one banner image on right side of callout block. banner_image_block_id is the identifier you have created with static block in magento

Filed Under: Programming Tagged With: Magento

Magento – Get Current Store Details

Apr 2, 2017 by Editorial Staff Leave a Comment

To get the current store details you can use following code. Gets the current store’s id Gets the current store’s code Gets the current website’s id Gets the current store’sGroup id Gets the current store’s status Gets the current store’s locale Gets the current store’s home url Gets the current store’s name Gets the current […]

Filed Under: Programming Tagged With: Magento

A Guide to Secure Magento Website from Hacker

Mar 28, 2017 by Linda Wester Leave a Comment

Getting started with Magento eCommerce platform doesn’t mean your site is safe and secure. Despite the fact that Magento is the most robust content management system for eCommerce websites, you can’t take its security lightly. You need to take serious measures to combat the security and hacking issues for your web store. In fact, the […]

Filed Under: Programming Tagged With: Magento

Get Magento attribute names instead of ID numbers

Mar 28, 2017 by Editorial Staff Leave a Comment

The following will help you to get attribute names instead of ID numbers when handling product attributes

Filed Under: Programming Tagged With: Magento

Magento Get Customer Details

Mar 28, 2017 by Editorial Staff Leave a Comment

Getting customer details, there is handy function out there in Magento to achieve this. When working with Magento it’s very common that you need this information. So we are discussing how to get customer details in Magento. Follow the below steps Get customer Id from session in Magento Using the $customerId we can load the […]

Filed Under: Programming Tagged With: Magento

Change of Magento contacts page URL

Mar 27, 2017 by Editorial Staff 1 Comment

Magento’s default contact us form page URL is a little bit awkward as its says http://yourdomain.om/contacts. We can change this easily by creating a small module.

Filed Under: Magento Tagged With: Magento

How to get categories for a product in Magento

Mar 27, 2017 by Editorial Staff Leave a Comment

How to get categories for a product in Magento, use the below snippet code anywhere in the magneto.

Filed Under: Programming Tagged With: Magento

How to override the Magento 1 controller

Mar 27, 2017 by Editorial Staff Leave a Comment

How to override Magento controller, must be a good practice whenever we want to add/update a new functionality to current Magento controller functions. Why overriding controllers? Controller is the entry point for any incoming request in Magento. To handle this Magento declares numerous functions in the Controller file mainly called actions. Suppose you want to […]

Filed Under: Programming Tagged With: Magento

Get all children categories given a category id in Magento

Mar 27, 2017 by Editorial Staff Leave a Comment

If you want to get the children categories recursively, you can use: Get all children categories given a category id in Magento. This will retrieve all sub – sub categories recursively.

Filed Under: Programming Tagged With: Magento

Top Magento Hosting Providers

Mar 27, 2017 by Editorial Staff Leave a Comment

Building a Magento website is easy when comparing to figure out a good Magento hosting solution for the website. There are plenty of Magento hosting recommendations in the internet, but most of them are really confusing and sometimes misleading. Usually Magento developer companies suggest for the server, depending on the load and features of the website. […]

Filed Under: Programming Tagged With: Magento, Web Hosting

Magento Newsletter Tutorial

Mar 27, 2017 by Editorial Staff Leave a Comment

Magento Newsletter Tutorial When running an e-commerce store it is necessary to send out promotional emails and campaigns. Apparently, Magento having built in newsletter functionality and it’s easy to use. It allows site administrators to create and send email campaigns from admin panel. Before going to Magento newsletter page, we just need to set Magento email […]

Filed Under: Programming Tagged With: Magento

Redirecting to External URLs in Magento controllers

Mar 27, 2017 by Editorial Staff Leave a Comment

If you need to redirect to external URLs in Magento you have to use   There are similar method uses in Magento to redirect to another Magento internal path. $path would be an internal module/controller/action/param1/param1value page

Filed Under: Programming Tagged With: Magento

MAGENTO SEO – HOW TO DISABLE THE CATEGORIES PATH IN URL?

Mar 27, 2017 by Editorial Staff Leave a Comment

To do this, go to System => Configuration => Catalog => Catalog => Search Engine Optimization and set “Use categories path for product URL’s” to “no”.

Filed Under: Programming Tagged With: Magento

Direct SQL queries in Magento

Mar 27, 2017 by Editorial Staff Leave a Comment

This tutorial mainly demonstrates direct SQL queries in Magento.  Magento data models are giving great flexibility for the data processing. We don’t need to touch the complex SQL statements because of this feature. This often gives really quick development speed and accuracy more over a bulletproof approach. But several situations it much needed to execute […]

Filed Under: General, Magento Tagged With: Magento

How to use custom cache data in Magento

Mar 27, 2017 by Editorial Staff Leave a Comment

Using caching in Magento website is an essential part of development. Magento is well known for eating up the server resources. The below code snippet helps when someone deals with heavy data in Magento website.

Filed Under: Programming Tagged With: Magento

Creating Magento simple products programmatically

Mar 27, 2017 by Editorial Staff Leave a Comment

Products are the basic thing in the e-commerce shop and Magento has good features to create it from the backend. But certain situations we have to create it via  programmatically. For example a bulk upload from a API, or another store etc. How to create Magento simple products programmatically We can use API for this, […]

Filed Under: Programming Tagged With: Magento

Search by only product name in Mini Search In Magento

Mar 27, 2017 by Editorial Staff Leave a Comment

Magento has a good search functionality. By default when someone searches it search through all the description and short descriptions. So sometimes at first look this results appears to be strange. We need Search by only product name in Mini Search In Magento But the reason Magento pick this up because these keywords might be present […]

Filed Under: Magento Tagged With: Magento

Get a parent category and all sub-sub–sub categories in Magento

Mar 27, 2017 by Editorial Staff Leave a Comment

Getting all sub(recursively) categories in Magento, not an easy task. I’ve seen so many of them looping through the category model and creating overhead to the server. It’s mainly because the each model creates and SQL query. Good performance Single Query Solution: Let $parentCategory be your Main Category, then this collection will load all subcategories, […]

Filed Under: General, Programming Tagged With: Magento

How to get data from Magento System Configuration

Mar 27, 2017 by Editorial Staff Leave a Comment

Magento stores all the configuration values in the database, but it has a particular format to retrieve the data. Getting data from system configuration table is easy. sectionName, groupName and fieldName are present in etc/system.xml file of your module. It will automatically fetch config value of currently viewed store as you have the option to enable […]

Filed Under: Programming Tagged With: Magento

Get order currency code from order

Mar 27, 2017 by Editorial Staff Leave a Comment

When we need to get currency code from order object use the below code 1) currency code from order object 2) With currency symbol

Filed Under: Programming Tagged With: Magento

How to clear the Magento cache?

Mar 27, 2017 by Editorial Staff Leave a Comment

When making certain changes to Magento,  it is necessary to clear the cache in order to reflect the changes to reflect. There are three ways to clear the cache in Magento: Through the Magento Admin Panel website.   Log in to your Admin Panel account Go to the System -> Cache Management section Click on […]

Filed Under: Programming Tagged With: Magento

Magento: Convert Price from Current Currency to Base Currency

Mar 27, 2017 by Editorial Staff 2 Comments

It’s quick way to convert currency from one currency to another in Magento and vice-versa. It is useful when you are using multiple currencies in a shop. From below code, you can convert from currency to another chosen currency. Changing  currency from one to another

Filed Under: Programming Tagged With: Magento

how to get category name of current product in magento

Mar 27, 2017 by Editorial Staff Leave a Comment

Getting the category name for the current product in Magento it’s easy to find out with below codes.

Filed Under: Magento Tagged With: Magento

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar




Quick Links

  • A Simple YouTube Video Downloader Script in PHP
  • The 50 Most Useful jQuery Plugins for Frontend Development
  • Word Set 01
  • Convert PNG to JPG Online

Subscribe

* indicates required

Share

   

Hot topics

  • A Simple YouTube Video Downloader Script in PHP 13.3k views
  • Open a URL in a new tab using JavaScript 10.7k views
  • Using Third-Party Libraries in Codeigniter 8.4k views
  • Add FTP/SFTP in Visual Studio Code 6.1k views
  • Replace “\n” with new line characters, using Notepad++ 4.8k views
  • Manually Install APK Files In Android Studio Emulator 4.7k views
  • Upload Multiple Images and Store in Database using PHP and MySQL. 4.5k views
  • How To Install And Use CKEditor In Laravel? 4.2k views
  • Simple PHP Shopping Cart 4k views
  • Spout, an awesome library for reading and writing in Excel. 3.3k views

Categories

  • Design & Development
  • Drupal
  • Facebook
  • General
  • How To
  • ios
  • Javascript
  • Linux
  • Magento
  • Marketing
  • News
  • PHP
  • Plugins
  • Programming
  • Snippets List
  • Social Media
  • Softwares
  • Themes
  • Tips
  • Wordpress
  • YouTube

Copyright © 2021 · TutsPlanet Gene Theme on Genesis Framework · Powered By BunnyCDN