Truemag

  • Categories
    • Tips And Tricks
    • Internet
    • PHP
    • Javascript
    • CSharp
    • SQL Server
    • Linux
  • Lastest Videos
  • Our Demos
  • About
  • Contact
  • Home
  • Write With Us
  • Job Request
Home PHP PHP Magento Get Manufacturer Name And ID From Magento Product ID

PHP Magento Get Manufacturer Name And ID From Magento Product ID

This PHP example is simply get the manufacturer name and manufacturer id from a specified product ID in Magento.

1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
	require_once ('D:/_$projects/23. MIREI/23.1 mirei.vn/Magento/app/Mage.php');
	Mage::init();
 
	$productId = 908; // this is Magento Product ID
	$product = \Mage::getModel('catalog/product')->load((int) $productId);
 
	$manufacturer_id = (int) $product->getData('manufacturer');
	$manufacturer_name = $product->getAttributeText('manufacturer');
 
	echo "manufacturer id: " . $manufacturer_id . "<br>";
	echo "manufacturer name: " . $manufacturer_name . "<br>";
?>

<?php require_once ('D:/_$projects/23. MIREI/23.1 mirei.vn/Magento/app/Mage.php'); Mage::init(); $productId = 908; // this is Magento Product ID $product = \Mage::getModel('catalog/product')->load((int) $productId); $manufacturer_id = (int) $product->getData('manufacturer'); $manufacturer_name = $product->getAttributeText('manufacturer'); echo "manufacturer id: " . $manufacturer_id . "<br>"; echo "manufacturer name: " . $manufacturer_name . "<br>"; ?>

Aug 12, 2015Hoan Huynh
Know Simple Hacks To Systematize Media Library in WordPressIonic bower the name contains uppercase letters
You Might Also Like:
  • Magnanimous Magento – Why it is so popular!
  • Top 8 Magento extensions that’ll grow your E-store visitor count
  • PHP Get Likes Number Of Facebook Page
  • PHP CURL Post To HTTPS Website
  • Get or Find Facebook Profile Id Number
  • PHP Connect To MS SQL Server
  • C# ASP.NET Remove leading and trailing quotes(‘) or double quotes (“)
  • C# Parse Item Value And Name In XML String
  • A handy guideline on adding custom menu item in WordPress admin
Hoan Huynh

Hoan Huynh is the founder and head of 4rapiddev.com. Reach him at [email protected]

5 years ago PHPgetAttributeText, getData, getModel, Magento, manufacturer741
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Most Viewed
PHP Download Image Or File From URL
22,167 views
Notepad Plus Plus Compare Plugin
How To Install Compare Text Plugin In Notepad Plus Plus
20,044 views
Microsoft SQL Server 2008 Attach Remove Log
Delete, Shrink, Eliminate Transaction Log .LDF File
15,823 views
JQuery Allow only numeric characters or only alphabet characters in textbox
13,306 views
C# Read Json From URL And Parse/Deserialize Json
9,793 views
4 Rapid Development is a central page that is targeted at newbie and professional programmers, database administrators, system admin, web masters and bloggers.
Recent Posts
  • How to Compose Your Essay To Me – 4 Easy Steps to Write My Essay
  • How to Find a Photo Editor
  • Installment Loans – Making Sense of Online Software
  • Apple Pay Casino Canada
  • Casinos austria
Categories
  • CSharp (45)
  • Facebook Graph API (19)
  • Google API (7)
  • Internet (87)
  • iPhone XCode (8)
  • Javascript (35)
  • Linux (28)
  • MySQL (16)
  • PHP (84)
  • Problem Issue Error (29)
  • Resources (32)
  • SQL Server (25)
  • Timeline (5)
  • Tips And Tricks (141)
  • Uncategorized (105)
Recommended
  • Custom Software Development Company
  • Online Useful Tools
  • Premium Themes
  • VPS
2014 © 4 Rapid Development