customgento / CustomGento_ConfigurableTierPrices

Tier Prices For Configurable Products for Magento 1 changes the way Magento calculates tier prices of configurable products.
Other
39 stars 12 forks source link

Configurable Tier Pricing not working #1

Closed realchriswells closed 12 years ago

realchriswells commented 12 years ago

Afternoon,

I have recently installed this module via MagentoConnect on a 1.4.1.1 site and the client had setup a tiered pricing structure on the configurable product.

Upon adding the product to the cart 2x one colour and 1x of another, the full price is being charged for all three until I increase one of the colours to 3 then the discount kicks in.

The product in question is: http://www.swimtec-uk.com/quantum-898-100-memory-17.html

Is there anything that could be causing the issue?

Thanks, Chris

sprankhub commented 12 years ago

Dear Chris,

please check under System - Configuration - Extended - Extended if the module is installed correctly. Then, make sure that you have cleared the cache. If that does not work, the only idea I have is that another extension overwrites the class "Mage_Catalog_Model_Product_Type_Configurable_Price"...

Cheers, Simon

realchriswells commented 12 years ago

Hi Simon,

I do not seem to have the System - Configuration - Extended - Extended menu. Cleared the cache to make sure it wasn't that, but it didn't show up after that either.

I have tried reinstalling the module, but no joy.

Is there a way I can check the files to make sure they're installed correctly?

sprankhub commented 12 years ago

If you have FTP access, you could check if all the relevant files from the GitHub repo are present - especially app/etc/modules/Spranks_ConfigurableTierPrices.xml and if the module is enabled in this file.

realchriswells commented 12 years ago

I've just checked and the files do seem to be there, and according to Spranks_ConfigurableTierPrices.xml, is set to true.

One thing I did notice is that there is nothing in design/adminhtml/default/default/layout for admin stuff - could this be why nothing is showing up in the admin area? But then there is nothing in the repo either about it...

sprankhub commented 12 years ago

No, the extension does not need any stuff in design/adminhtml/*.

Then the only idea I have is that another extension is also rewriting Mage_Catalog_Model_Product_Type_Configurable_Price... You could check this with the extension Firegento_Core (https://github.com/firegento/firegento).

sprankhub commented 12 years ago

Could you solve your problem in the meantime?

nzaman commented 12 years ago

Hi there,

I am having the same issue. I checked everything as you said above (except the Firegento_Core option).

I guess my Mage_Catalog_Model_Product_Type_Configurable_Price class is overwrite by another extension.

Can you please show me the way to solve the issue.

I need the solution asap and badly. My project is hold due to this issue

Your prompt response will be highly appreciated.

Thanks.

-Nowshin

sprankhub commented 12 years ago

Hi Nowshin,

checking if another extension rewrites the same class is the basis for solving this problem. So please use something like Firegento to check that and tell me the name of the extension which has the same rewrite.

Cheers Simon

nzaman commented 12 years ago

Hi Simon

I am not too familiar with Firegento .

I installed it and from admin i go to Firegento - > diagnostic -> Check rewrites

I got the view as i attached in the attachment. Can you please check and suggest me what should i do now.

I badly need to make your extension work.

Please Help!

Waiting for your valuable response.

Thanks. -Nowshin

On Thu, Oct 4, 2012 at 3:20 PM, Simon Sprankel notifications@github.comwrote:

Hi Nowshin,

checking if another extension rewrites the same class is the basis for solving this problem. So please use something like Firegento to check that and tell me the name of the extension which has the same rewrite.

Cheers Simon

— Reply to this email directly or view it on GitHubhttps://github.com/sprankhub/Spranks_ConfigurableTierPrices/issues/1#issuecomment-9130927.

Kind Regards, Nowshin Zaman s.zaman@oscillosoft.com.au | Skype: nowshinzaman p: +61 1300 301 771 | f: +612 8203 4599 Unit 4, 155 Glendenning Road, Glendenning, NSW -2761 http://www.oscillosoft.com.au |_ ACN: 123 884 328 [image: Australian Government Endorsed Suppliers] [image: Saassu Partner] [image:

1 Zoho implementation partner in Australia/NZ] [image: #1 Zoho

implementation partner in Australia/NZ] [image: HP Business Partner] [image: Facebook]http://www.facebook.com/pages/OscilloSoft-Pty-Limited/150537708352613 [image: Twitter] http://twitter.com/#%21/oscillosoft Click http://oscillosoft.com.au/ here To See Complete Cloud Solution For Your Business. To lodge support request send email at support@oscillosoft.com.au, alternatively you can visit our support portal at support.zoho.com/portal/oscillosoft. We always welcome your feedback and suggestions please join us at discussions.zoho.com/oscillosoft

nzaman commented 12 years ago

Sorry .. I forgot to attach the attachment. :) Please check...

On Thu, Oct 4, 2012 at 3:31 PM, Nowshin Zaman s.zaman@oscillosoft.com.auwrote:

Hi Simon

I am not too familiar with Firegento .

I installed it and from admin i go to Firegento - > diagnostic -> Check rewrites

I got the view as i attached in the attachment. Can you please check and suggest me what should i do now.

I badly need to make your extension work.

Please Help!

Waiting for your valuable response.

Thanks. -Nowshin

On Thu, Oct 4, 2012 at 3:20 PM, Simon Sprankel notifications@github.comwrote:

Hi Nowshin,

checking if another extension rewrites the same class is the basis for solving this problem. So please use something like Firegento to check that and tell me the name of the extension which has the same rewrite.

Cheers Simon

— Reply to this email directly or view it on GitHubhttps://github.com/sprankhub/Spranks_ConfigurableTierPrices/issues/1#issuecomment-9130927.

Kind Regards, Nowshin Zaman s.zaman@oscillosoft.com.au | Skype: nowshinzaman p: +61 1300 301 771 | f: +612 8203 4599 Unit 4, 155 Glendenning Road, Glendenning, NSW -2761 http://www.oscillosoft.com.au |_ ACN: 123 884 328 [image: Australian Government Endorsed Suppliers] [image: Saassu Partner] [image:

1 Zoho implementation partner in Australia/NZ] [image: #1 Zoho

implementation partner in Australia/NZ] [image: HP Business Partner] [image: Facebook]http://www.facebook.com/pages/OscilloSoft-Pty-Limited/150537708352613 [image: Twitter] http://twitter.com/#%21/oscillosoft Click http://oscillosoft.com.au/ here To See Complete Cloud Solution For Your Business. To lodge support request send email at support@oscillosoft.com.au, alternatively you can visit our support portal at support.zoho.com/portal/oscillosoft. We always welcome your feedback and suggestions please join us at discussions.zoho.com/oscillosoft

Kind Regards, Nowshin Zaman s.zaman@oscillosoft.com.au | Skype: nowshinzaman p: +61 1300 301 771 | f: +612 8203 4599 Unit 4, 155 Glendenning Road, Glendenning, NSW -2761 http://www.oscillosoft.com.au |_ ACN: 123 884 328 [image: Australian Government Endorsed Suppliers] [image: Saassu Partner] [image:

1 Zoho implementation partner in Australia/NZ] [image: #1 Zoho

implementation partner in Australia/NZ] [image: HP Business Partner] [image: Facebook]http://www.facebook.com/pages/OscilloSoft-Pty-Limited/150537708352613 [image: Twitter] http://twitter.com/#%21/oscillosoft Click http://oscillosoft.com.au/ here To See Complete Cloud Solution For Your Business. To lodge support request send email at support@oscillosoft.com.au, alternatively you can visit our support portal at support.zoho.com/portal/oscillosoft. We always welcome your feedback and suggestions please join us at discussions.zoho.com/oscillosoft

nzaman commented 12 years ago

Hi Simon

I am not too familiar with Firegento .

I installed it and from admin i go to Firegento - > diagnostic -> Check rewrites

I got the view : Path Rewrite Class Active Class Status catalog/product_new MagicToolbox_MagicZoom_Block_Product_New MagicToolbox_MagicZoom_Block_Product_New Ok catalog/product_view_options_type_select MagicToolbox_MagicZoom_Block_Product_View_Options_Type_Select MagicToolbox_MagicZoom_Block_Product_View_Options_Type_Select Ok catalog/product_type_configurable_price Spranks_ConfigurableTierPrices_Model_Product_Type_Configurable_Price Spranks_ConfigurableTierPrices_Model_Product_Type_Configurable_Price Ok

Can you please check and suggest me what should i do now.

I badly need to make your extension work.

Please Help!

Waiting for your valuable response.

Thanks. -Nowshin

sprankhub commented 12 years ago

Hi Nowshin,

I will check the extension again in Magento 1.4 in the evening (although you should consider an upgrade). Rewrites seem to be okay, but in order to make sure that there is no conflict, you could disable all non-core modules under app/etc/modules, clear the cache and have a look if the extension works.

Cheers Simon

nzaman commented 12 years ago

Hi Simon,

Thanks a lot that you have been so helpful.

I am using magento 1.7.0.1 I am using these extensions- magic toolbox magic zoom, Webguys_Configurablematrix, Webshopapps_Matrixrate

I rename the other non core xml in app/etc/modules but still the extension does not work.

Is there any quick solution in your mind?

I need to solve the issue asap.

Thanks Nowshin

On Thu, Oct 4, 2012 at 3:44 PM, Simon Sprankel notifications@github.comwrote:

Hi Nowshin,

I will check the extension again in Magento 1.4 in the evening (although you should consider an upgrade). Rewrites seem to be okay, but in order to make sure that there is no conflict, you could disable all non-core modules under app/etc/modules, clear the cache and have a look if the extension works.

Cheers Simon

— Reply to this email directly or view it on GitHubhttps://github.com/sprankhub/Spranks_ConfigurableTierPrices/issues/1#issuecomment-9131228.

Kind Regards, Nowshin Zaman s.zaman@oscillosoft.com.au | Skype: nowshinzaman p: +61 1300 301 771 | f: +612 8203 4599 Unit 4, 155 Glendenning Road, Glendenning, NSW -2761 http://www.oscillosoft.com.au |_ ACN: 123 884 328 [image: Australian Government Endorsed Suppliers] [image: Saassu Partner] [image:

1 Zoho implementation partner in Australia/NZ] [image: #1 Zoho

implementation partner in Australia/NZ] [image: HP Business Partner] [image: Facebook]http://www.facebook.com/pages/OscilloSoft-Pty-Limited/150537708352613 [image: Twitter] http://twitter.com/#%21/oscillosoft Click http://oscillosoft.com.au/ here To See Complete Cloud Solution For Your Business. To lodge support request send email at support@oscillosoft.com.au, alternatively you can visit our support portal at support.zoho.com/portal/oscillosoft. We always welcome your feedback and suggestions please join us at discussions.zoho.com/oscillosoft

nzaman commented 12 years ago

Hi Simon,

I got the issue. Your extension is conflict with my another extension Webguys_Configurablematrix. I remove this extension and now your extension is working perfectly.

Can you please suggest me how can i use both of this extension in my site...

Please Help!

Your prompt response will be highly appreciated.

Thanks Nowshin

nzaman commented 12 years ago

Hi Simon,

If my Configurablematrix extension is on then my process does not enter in your price.php , it starts to get value from app/code/core/Mage/Catalog/Model/Product/Type/price.php

Can you please suggest me how can i sorted the issue.

Please Help!

Your prompt response will be highly appreciated.

Thanks Nowshin

sprankhub commented 12 years ago

Hi Nowshin,

since the extension Webguys_Configurablematrix is not open source, I can not have a look at the code. Anyway, you could send me the extension and I will try to fix the issue (see http://www.coderblog.de/impressum/ for contact information). Although it sounds that the extension Webguys_Configurablematrix is producing the problem and not my extension ;)

Cheers Simon

nzaman commented 12 years ago

Hi Siman,

Finally i can make your code work with my one. But i am facing another problem and not getting any proper forum post. Thats why mailing you, if you can help me out.

In my store for one configurable product i have different tier price. suppose :

white: 1-5 = $8 6-10 = $6

Red: 1-5 = $10 6-10 = $7

Blue: 1-5 = $10 6-10 = $7

Now if i buy 3white, 4red, 4blue my cart shows me the price $7 for red and blue and $6 for white. as its get the quantity (3+4+4).

But I need to show it like : white - $8 (as its quantity is 4) Blue and red $7 (as its quantity is 4+4=8).

here is my code:

/* start of code*/

public function getFinalPrice($qty = null, $product) { if (is_null($qty) && !is_null($product->getCalculatedFinalPrice())) { return $product->getCalculatedFinalPrice(); }

    $finalPrice = $this->getBasePrice($product, $qty);

    //var_dump( $finalPrice );
    $tierPrice = $this->calcConfigProductTierPricing($product);
    //var_dump("mainTier".$tierPrice);
    if($tierPrice > 0){

       if ($tierPrice < $finalPrice) {
            $finalPrice = $tierPrice;
       }
    }

    return $finalPrice;
}

public function calcConfigProductTierPricing($product)
{

     $tierPrice = 0;
    if ($items =

Mage::getSingleton('checkout/session')->getQuote()->getItemsCollection()) { // map mapping the IDs of the parent products with the quantities of the corresponding simple products $idQuantities = array(); //$idpricing = array ();

        // go through all products in the quote

        foreach ($items as $item) {

            $productModel = Mage::getModel('catalog/product');
            $id = $productModel->getIdBySku($item->getSku());

            // get the parent IDs
            $configurableProductModel =

Mage::getModel('catalog/product_type_configurable'); $parentIdArray = $configurableProductModel->getParentIdsByChild($id);

            foreach ($parentIdArray as $parent){

                $idQuantities[$parent][] = $item->getQty();

                 }

        }

        $newprice=array();
        foreach ($product->getTierPrice() as $testier){
        $now[] = $testier;
        }

$firstprice=$now[0]['website_price'].".0000"; $parentIds = Mage::getResourceSingleton('catalog/product_type_configurable') ->getParentIdsByChild($product->getId());

foreach ($parentIds as $pro) { //var_dump($pro); }

       if (array_key_exists($pro, $idQuantities)) {

                 $totalQty = array_sum($idQuantities[$pro]);

        $tierPrice = $this->getTierPrice($totalQty, $product);
        }
    }
    return $tierPrice;
}

/* end of code*/

Please if you can help me or have any reference from where i can get help. I will be grateful to you.

-Nowshin

demonkiller commented 12 years ago

did the issue with the configurable matrix get resolved? i am also receiving the same issue and am looking for the solution? where did you place that code fix above?

sprankhub commented 12 years ago

You have also installed the extension Webguys_Configurablematrix and my extension does not work with it?

demonkiller commented 12 years ago

yes unsure how to resolve any help would be appreciated

sprankhub commented 12 years ago

I am in contact with the extension developer. We will try to solve the problem. See #4.

demonkiller commented 12 years ago

thankyou greatly