Entwicklung - CMS/Shopsysteme - Magento - Configurable-Produkte: get configurable product associated to simple product

Magento: Configurable-Produkte: get configurable product associated to sim...

eb1

eb1

04.02.2011 11:07

  • 6 Postings, noch 44 bis zum nächsten Level (50)

Postings: 6

Configurable-Produkte: get configurable product associated to simple product

Montag, 07. Februar 2011 14:06

  • 0.0/6 Votes: 0
0.0/6 Votes: 0
PHP: (Auswählen)//get parent (configurable) ids
if ($_product->getTypeId() <> "configurable") {
    $parentId = $_product->loadParentProductIds()->getData('parent_product_ids');
    if(isset($parentId[0])){
        $parent = Mage::getModel('catalog/product')->load($parentId[0]);
    }
}

ab Magento Version 1.4.2 folgenden Code benutzen, da loadParentProductIds() depreciated ist:

PHP: (Auswählen)//get parent (configurable) ids
if ($_product->getTypeId() <> "configurable") {
    $parentId = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($_product->getId());

    if(isset($parentId[0])){
        $parentProduct = Mage::getModel('catalog/product')->load($parentId[0]);
    }
}
Zuletzt editiert:Montag, 07. Februar 2011 15:11
Bookmark setzen!:Zu Google Bookmark hinzufügen.Zu bloglines hinzufügen.Zu Newsgator hinzufügen.Zu FURL hinzufügen.Zu DIGG hinzufügen.Zu Webnews hinzufügen.Zu Netscape hinzufügen.Zu Yahoo MyWeb hinzufügen.Zu spurl.net hinzufügen.Zu diigo hinzufügen.Zu Newsvine hinzufügen.Zu del.icio.us hinzufügen.Zu SIMPIFY hinzufügen.Zu Mister Wong hinzufügen.Zu Linkarena hinzufügen.Zu isio.de hinzufügen.Zu Oneview hinzufügen.Zu yigg.de hinzufügen.Zu reddit hinzufügen.Zu StumbleUpon hinzufügen.Zu Slashdot hinzufügen.Zu Blinklist hinzufügen.Zu Technorati hinzufügen.Zu Blogmarks hinzufügen.Zu Blinkbits hinzufügen.Zu ma.gnolia hinzufügen.Zu smarking.com hinzufügen.Zu Netvouz hinzufügen.Zu co.mments hinzufügen.Zu Connotea hinzufügen.Zu de.lirio.us hinzufügen.

Specials

Bytefresser Specials: Anno 1404

Umfrage

Welches ist Dein Lieblings-Anno?

(160 Stimmen)

1. Ganz klar: Anno 1800!
2. Anno 2205
3. Anno 2070
4. Anno 1404
5. Anno 1701
6. Anno 1503
7. Anno 1602
8. Anno Online

Benutzer-Counter

Besucher gesamt: 1.326.828
Besucher heute: 75
Besucher gestern: 335
Max. Besucher/Tag: 1.578
Gerade online: 13
Max. online: 167
Seiten gesamt: 32.875.098
Aufrufe diese Seite: 5.493

Tag-Cloud

  shopsysteme     bookmark     magento     bytefresser     entwicklung     level     auswählen     postings     version     zuletzt     montag     februar