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

Bundle Product and Paypal / Googlecheckout totals
 
binaryslate
Jr. Member
 
Total Posts:  12
Joined:  2009-05-30
 

Hi All,

We have an issue with bundle products when one of the bundled components has a qty more than 1.  During the normal checkout process the totals are all correct and the payment taken is correct.

When paying via paypal or googlecheckout, the item price is incorrect for the bundle product.

For example

1x BUNDLE1 containing 2 x ITEM1 @ £10 each

1x BUNDLE1 should cost £20 but paypal and googlecheckout only see 1x ITEM1 and collect £10
2x BUNDLE1 should cost £40 but paypal and googlecheckout only see 1x ITEM1 and collect £20

It seems that with these payment methods the purchased qty is not multiplied by the component qty to give the correct total.

Just wondering if anyone else has noticed this issue or has a solution for it?

We are running 1.4.0.1 at the moment.

Best Regards

 
Magento Community Magento Community
Magento Community
Magento Community
 
binaryslate
Jr. Member
 
Total Posts:  12
Joined:  2009-05-30
 

I have a working solution for Paypal Standard

app/code/core/Mage/Paypal/Helper/Data.php line 161

In function _prepareLineItemFields Add the following after

$amount $item->getBaseCalculationPrice();

if($item->getProductType() == 'bundle'{
  $amount 
$item->getRowTotal() / $qty;
}

Hope this helps anyone who is having the same issue

 
Magento Community Magento Community
Magento Community
Magento Community
 
binaryslate
Jr. Member
 
Total Posts:  12
Joined:  2009-05-30
 

Also fixed in GoogleCheckout

app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php from row 84

$qty $item->getQty();
            if(
$item->getProductType() == 'bundle'{
                
# Use row total
                
$amount $item->getRowTotal() / $qty;
            
else {
                $amount 
$item->getBaseCalculationPrice();
            
}

            $xml 
.= <<<EOT
            <item>
                <merchant-item-id><![CDATA[{
$item->getSku()}]]></merchant-item-id>
                <item-name><![CDATA[{
$item->getName()}]]></item-name>
                <item-description><![CDATA[{
$item->getDescription()}]]></item-description>
                <unit-price currency="{
$this->getCurrency()}">{$amount}</unit-price>
                <quantity>{
$qty}</quantity>
                <item-weight unit="{
$weightUnit}" value="{$weight}" />
                <tax-table-selector>{
$taxClass}</tax-table-selector>
                {
$this->_getDigitalContentXml($item->getIsVirtual())}
                {
$this->_getMerchantPrivateItemDataXml($item)}
            </item>

EOT;
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top