CoreCommunity ExtensionsIncubatorDistributionsTYPO3 4.5 ProjectsTYPO3 4.7 ProjectsTYPO3 6.0 ProjectsTYPO3 6.1 ProjectsTYPO3 6.2 Projects (+)

Bug #1678

Chosen attributes not displayed in basket

Added by Sascha Egerer over 4 years ago. Updated over 2 years ago.

Status:Resolved Start date:2008-10-11
Priority:Must have Due date:
Assignee:Ingo Schmitt % Done:

100%

Category:Bug Spent time: -
Target version:0.10.1
Votes: 0

Description

The chosen attributes are not displayed in basket.

patch_1678.diff (755 Bytes) Sascha Egerer, 2008-10-11 16:25

patch_1678.diff (787 Bytes) Sascha Egerer, 2009-02-07 19:42


Related issues

duplicated by commerce - Bug #2717: Just first character of attribute values shown in FE Resolved 2009-02-27
duplicated by commerce - Bug #9562: Wrong named template-marker in shoppingcart.tpl New 2008-10-11

Associated revisions

Revision 21637
Added by Sascha Egerer almost 5 years ago

Chosen attributes not displayed in basket [fixes #1678]

Revision 21637
Added by Sascha Egerer almost 5 years ago

Chosen attributes not displayed in basket [fixes #1678]

History

Updated by Sascha Egerer over 4 years ago

  • File patch_1678.diff added

Updated by Sascha Egerer over 4 years ago

  • File deleted (patch_1678.diff)

Updated by Janine over 4 years ago

Sascha Egerer wrote:

The chosen attributes are not displayed in basket.

I have done the .diff in my php-file and added a new Marker in my template like this:

<h3>PRODUCT_BASKET_FORM_SMALL</h3>
<br />
<!-- ###PRODUCT_BASKET_FORM_SMALL### end -->
        <td>###SELECT_ATTRIBUTES_VALUE###</td>
        <td align="right">###BASKET_ITEM_PRICEGROSS###</td>

                .........

<!-- ###PRODUCT_BASKET_FORM_SMALL### end -->

but my attributes (there are more than one) are still not displayed!?

Updated by Sascha Egerer over 4 years ago

Try this marker ###ARTICLE_SELECT_ATTRIBUTES### instead of ###SELECT_ATTRIBUTES_VALUE###

Updated by Janine over 4 years ago

No sorry - the output doesn't work!
This is my php-code after your diff:

    /**
     * Genrates the Basket Forms per line
     * @param    object    $art: Article Object
     * @param    object    $prod: Product Object
     * @return    string    HTML-Content
     * @Since added $prod for gettingSelectAttributes for Article
     */
         function makeArticleView(&$art,$prod=''){
            // Getting the select Attributes for displaying
            if(is_object($prod)){
                     $attributeArray = $prod->get_Atrribute_Matrix(array($art->get_uid()),$this->select_attributes);
                    if(is_array($attributeArray)) {
                        $attCode = '';
                        $templateAttr = $this->cObj->getSubpart($this->templateCode, '###BASKET_SELECT_ATTRIBUTES###');
                        foreach($attributeArray as $attribute_uid => $myAttribute) {
                            $attributeObj = new tx_commerce_attribute($attribute_uid,$GLOBALS['TSFE']->tmpl->setup['config.']['sys_language_uid']);
                            $attributeObj->load_data();
                            $markerArray["###SELECT_ATTRIBUTES_TITLE###"] = $myAttribute['title'];
                            list($k,$v) = each($myAttribute['values']);
                            $markerArray["###SELECT_ATTRIBUTES_VALUE###"] = $v['value'];
                            $markerArray["###SELECT_ATTRIBUTES_UNIT###"] = $myAttribute['unit'];

                            $attCode .= $this->cObj->substituteMarkerArrayCached($templateAttr, $markerArray , array()); 
                        }
                     }
            }

                #$markerArray = $art->getMarkerArray($this->cObj,$conf,'article_');
            #debug($markerArray,'article_infos');
            $markerArray['###ARTICLE_SELECT_ATTRIBUTES###'] =$attCode;
            $markerArray['###ARTICLE_UID###']= $art->getUid();    
            $markerArray['###STARTFRM###'] = '<form name="basket_'.$art->uid.'" action="'.$this->pi_getPageLink($this->conf['basketPid']).'" method="post">';
            $markerArray['###HIDDENFIELDS###'] = '<input type="hidden" name="'.$this->prefixId.'[catUid]" value="'.$this->piVars[catUid].'" />';
            $markerArray['###HIDDENFIELDS###'] .= '<input type="hidden" name="'.$this->prefixId.'[artAddUid]['.$art->uid.'][price_id]" value="'.$this->basket->basket_items[$art->uid]->get_price_uid().'" />';

            $markerArray['###ARTICLE_HIDDENFIELDS###'] = '<input type="hidden" name="'.$this->prefixId.'[catUid]" value="'.$this->piVars[catUid].'" />';
            $markerArray['###ARTICLE_HIDDENFIELDS###'] .='<input type="hidden" name="'.$this->prefixId.'[artAddUid]['.$art->uid.'][price_id]" value="'.$this->basket->basket_items[$art->uid]->get_price_uid().'" />';

            $markerArray['###QTY_INPUT_VALUE###'] = $this->basket->basket_items[$art->uid]->quantity;
            $markerArray['###QTY_INPUT_NAME###'] = $this->prefixId.'[artAddUid]['.$art->uid.'][count]';
            $markerArray['###BASKET_ITEM_PRICENET###'] =  tx_moneylib::format($this->basket->basket_items[$art->uid]->get_price_net(),$this->currency);
            $markerArray['###BASKET_ITEM_PRICEGROSS###'] =  tx_moneylib::format($this->basket->basket_items[$art->uid]->get_price_gross(),$this->currency);
            $markerArray['###BASKET_ITEM_PRICENETNOSCALE###'] =  tx_moneylib::format($this->basket->basket_items[$art->uid]->getNoScalePriceNet(),$this->currency);
            $markerArray['###BASKET_ITEM_PRICEGROSSNOSCALE###'] =  tx_moneylib::format($this->basket->basket_items[$art->uid]->getNoScalePriceGross(),$this->currency);
            $markerArray['###BASKET_ITEM_COUNT###'] = $this->basket->basket_items[$art->uid]->get_quantity();
            $markerArray['###BASKET_ITEM_PRICESUM_NET###'] =  tx_moneylib::format($this->basket->basket_items[$art->uid]->get_item_sum_net(),$this->currency);
            $markerArray['###BASKET_ITEM_PRICESUM_GROSS###'] =  tx_moneylib::format($this->basket->basket_items[$art->uid]->get_item_sum_gross(),$this->currency);

Maybe there is a bug?

Updated by Sascha Egerer over 4 years ago

Janine wrote:

No sorry - the output doesn't work! This is my php-code after your diff: [...]

Maybe there is a bug?

Is there any output for the attributes?
Does the subpart ###BASKET_SELECT_ATTRIBUTES### exist in your template file?
What is the value of $attCode after the foreach loop?

Updated by Ingo Schmitt over 4 years ago

  • Target version set to 0.10.1

Updated by Sascha Egerer over 4 years ago

Can you please apply this patch? I've added a patch against current trunk.

Updated by Morten Haggren about 4 years ago

Sascha Egerer wrote:

Can you please apply this patch? I've added a patch against current trunk.

Considering that this bug makes the basket useless for shops with variant products this should be added to the trunk

Updated by Sascha Egerer almost 4 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r21637.

Also available in: Atom PDF