Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Will pay for fix - Problem with duplicate display of products in emails
 
lindaw
Sr. Member
 
Total Posts:  201
Joined:  2007-12-25
 

Hi all,

After many, many hours, I have found the source of my problem but don’t know how to fix it and am hoping someone can help me.

MY new order email is printing out both the config product and simple product version (see attached - wrong.jpg).

All the other emails are printing out the products fine (see right.jpg) and I have discovered that I seem to have an old items.phtml file in: template/email/order/

So I put in the latest one from the newest release but it results in a pop up box on the order confirmation page (when you hit submit order) that simply says “undefined” and goes nowhere.

The code from the latest items.phtml that seems to be the problem is:

<?php $i=0; foreach ($_order->getAllItems() as $_item): ?>
    <?php 
if($_item->getParentItem()) continue; else $i++; ?>
    
<tbody<?php echo $i%' bgcolor="#eeeded"' '' ?>>
        
<?php echo $this->getItemHtml($_item?>
    
</tbody>
    
<?php endforeach; ?>

The original code that I’m using is:

<?php $i=0; foreach ($_order->getAllItems() as $_item): $i++ ?>
        
<tr <?php echo $i%2?'bgcolor="#eeeded"':'' ?>>

            <
td align="left" valign="top" style="padding:3px 9px">
                
<?php echo $this->htmlEscape($_item->getName()) ?>
                <?php 
echo $_item->getDescription() ?>

            <?php 
if($_item->getGiftMessageId() && $_giftMessage $this->helper('giftmessage/message')->getGiftMessage($_item->getGiftMessageId())): ?>
            
<br/><strong><?php echo $this->__('Gift Message'?></strong>
            <
br/><?php echo $this->__('From:'); ?> <?php echo $this->htmlEscape($_giftMessage->getSender()) ?>
            
<br/><?php echo $this->__('To:'); ?> <?php echo $this->htmlEscape($_giftMessage->getRecipient()) ?>
            
<br/><?php echo $this->__('Message:'); ?><br/> <?php echo $this->htmlEscape($_giftMessage->getMessage()) ?>
            <?php 
endif; ?>
            
</td>
            <
td align="center" valign="top" style="padding:3px 9px"><?php echo $_item->getSku() ?></td>
            <
td align="center" valign="top" style="padding:3px 9px"><?php echo $_item->getQtyOrdered()*1 ?></td>
            <
td align="right" valign="top" style="padding:3px 9px"><?php echo $_order->formatPrice($_item->getRowTotal()) ?></td>
        </
tr>
    
<?php endforeach ?>

I have attached the full versions in case this isn’t the problem.

This is all I need to do to make my clients site live and I will pay someone to fix it if necessary.

Thanks so much.

Image Attachments
wrong.jpgright.jpg
File Attachments
my-version-items.phtml  (File Size: 6KB - Downloads: 25)
latest-items.phtml  (File Size: 5KB - Downloads: 27)
 
Magento Community Magento Community
Magento Community
Magento Community
 
lindaw
Sr. Member
 
Total Posts:  201
Joined:  2007-12-25
 

I am in a desperate way and will pay someone to help me with this. Please PM me if you’re interested.

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Amr Essam
Jr. Member
 
Total Posts:  2
Joined:  2008-12-14
Egypt
 

What is the intended behavior of your editing of items.phtml

 
Magento Community Magento Community
Magento Community
Magento Community
 
lindaw
Sr. Member
 
Total Posts:  201
Joined:  2007-12-25
 

Thanks for replying Amr.

I ended up just doing it the very long way as is often the case with Magento… I copied the default design folder, updated again all of the changes I had made to the other one and then it worked. There was obviously a code update that didn’t transfer to my old design folder and I couldn’t find the problem so this was the easier (but way long) solution.

Thanks for trying, it’s appreciated.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top