0

Edit

I found the reason , i am using this extension : https://github.com/organicinternet/magento-configurable-simpfor that reason its not displaying configurable product in cart page.

but i need this extension, please help me how to fix this without disable the plugin

Edit end

we are using custom shipping method in our site....

we have a configurable products with associated simple products

we have "Add to cart" & "Buy Now Button" in product view page

please visit here

when we add the product to cart through "ADD TO CART" button, its adding both Configurable product and its associate product :

[![enter image description here][1]][1]

when we add the product to cart through "Buy Now button" button, its adding only associate product :

[![enter image description here][2]][2]

we created attribute "shipping charge" and entered the shipping prices there.

we were using this code Before for shipping charges :

$mpshippingcharge = 0;
 $localDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/local_shipping_distance');
 $regionalDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/regional_shipping_distance');
 $stateDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/state_shipping_distance');

Configurable product shipping price = 40, Associated Simple product shipping price = 20

1)If we click on "Add to cart" we were getting shipping charges as "Total shipping charges= configurable product shipping price [40] + Simple product shipping price [20] =60 as total shipping charge"

2)If we click on "Buy Now" button we were getting shipping charges as "Total shipping charges= only Simple product shipping price [20] =20 as total shipping charge"

In both cases, what we wanted is , "Total shipping charges= configurable product shipping price [40]" , so we used this code :

if (Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($proid))
 {
  continue;
 }
 $mpshippingcharge = 0;
 $localDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/local_shipping_distance');
 $regionalDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/regional_shipping_distance');
 $stateDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/state_shipping_distance');

1)If we click on "Add to cart" we were getting shipping charges as "Total shipping charges= configurable product shipping price [40]" This is perfect.

2) But If we click on "Buy Now" button we were getting shipping charges as "Total shipping charges= 0[zero]" .

But we want the same result as ADD TO CART button. = > This is the Problem

If we use following code, than "Total Shipping charges = Simple products shipping price" for both Add to cart & buy now buttons.

if ($item->getHasChildren()){
continue;
 }
$mpshippingcharge = 0;
$localDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/local_shipping_distance');
$regionalDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/regional_shipping_distance');
$stateDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/state_shipping_distance');

sir, please let me know if you need any information in FTP

template path hint : here

i am using following code to display "BUY NOW" button.

app/design/frontend/default/default/template/mpassignproduct/catalog/product/view/addtocart.phtml



 <?php if($assignPro['assignCount']): ?>
            <?php if($assignPro['sellerqty'] > 0): ?>

                <button type="button" title="<?php echo $buttonTitle ?>" id="product-addtocart-button" class="button btn-cart" onclick="productAddToCartForm.submit(this)"><span><span><?php echo $buttonTitle ?></span></span></button>

                <div style="clear: both; padding-top: 10px;">
               <button type="button" onclick="jQuery('#buy_
5
  • Hey, I took a look, but I am not seeing the shipping block in the cart so I can entire a zip code. Mar 4, 2016 at 17:50
  • hi, please check the link now.... you can see an option in cart page to enter zip code : prnt.sc/ac70nw Mar 7, 2016 at 6:37
  • @JerryLopez i updated the question, please check it Mar 7, 2016 at 7:57
  • @BabyinMagento if I understand right, before installing any module, you only wanted to display the simple product with the configurable product in the cart ? Mar 8, 2016 at 11:38
  • @DigitalPianism yes, i wanted to display both simple & configurable products in cart page. Mar 8, 2016 at 11:39

2 Answers 2

1

Install this module.

https://github.com/organicinternet/magento-configurable-simple. I hope it will help you

1
  • I updated the question, please check. when i used this plugin, than only i can not able to see "configurrable Product" in cart page Mar 7, 2016 at 7:58
0
+50
<?php

if (Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($proid))
 {
  continue;
 }
 $mpshippingcharge = 0;
 $localDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/local_shipping_distance');
 $regionalDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/regional_shipping_distance');
 $stateDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/state_shipping_distance');

if ($item->getHasChildren()){
continue;
 }
$mpshippingcharge = 0;
$localDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/local_shipping_distance');
$regionalDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/regional_shipping_distance');
$stateDistance = Mage::getStoreConfig('marketplace/mpperproductshipping/state_shipping_distance');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.