1

単一の製品に複数のオプションがあります。カート ページですべての製品オプション パラメータを取得するにはどうすればよいですか。お知らせ下さい。カート ページは、default.phtml ページに既に読み込まれています。このページはレンダラー ページを呼び出します。私は多くの方法を試していますが、うまくいきません。お知らせ下さい

カートコントローラーページで configureaction() を印刷できます

public function configureAction()
    {
        // Extract item and product to configure
        $id = (int) $this->getRequest()->getParam('id');
        $projectid = (int) $this->getRequest()->getParam('projectid');      
        $quoteItem = null;
        $cart = $this->_getCart();
        if ($id) {
            $quoteItem = $cart->getQuote()->getItemById($id);
        }

        if (!$quoteItem) {
            $this->_getSession()->addError($this->__('Quote item is not found.'));
            $this->_redirect('checkout/cart');
            return;
        }

        try {
            $params = new Varien_Object();
            $params->setCategoryId(false);
            $params->setConfigureMode(true);
            $params->setBuyRequest($quoteItem->getBuyRequest());
print_r($params);

私のパラメータリスト

    [_data:protected] => Array
        (
            [category_id] => 
            [configure_mode] => 1
            [buy_request] => Varien_Object Object
                (
                    [_data:protected] => Array
                        (
                            [id] => 689
                            [product] => 288
                            [related_product] => 
                            [super_attribute] => Array
                                (
                                    [143] => 65
                                    [144] => 71
                                )

                            [options] => Array
                                (
                                    [79] => 164
                                    [80] => 167
                                    [78] => 163
                                    [81] => 169
                                )

                            [attachment_hash] => Array
                                (
                                    [215] => 43f34b521ee06830bf462a4c060df869
                                )

                            [projectid] => 32
                            [qty] => 1
                            [reset_count] => 1
                            [original_qty] => 1
                        )

                    [_hasDataChanges:protected] => 1
                    [_origData:protected] => 
                    [_idFieldName:protected] => 
                    [_isDeleted:protected] => 
                    [_oldFieldsMap:protected] => Array
                        (
                        )

                    [_syncFieldsMap:protected] => Array
                        (
                        )

                )

        )

    [_hasDataChanges:protected] => 1
    [_origData:protected] => 
    [_idFieldName:protected] => 
    [_isDeleted:protected] => 
    [_oldFieldsMap:protected] => Array
        (
        )

    [_syncFieldsMap:protected] => Array
        (
        )

)

default.phtml ページまたは renderer.php ページでプロジェクト ID を取得する必要があります。私を導いてください。

4

1 に答える 1