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

Page 1 of 2
cost plus pricing / custom price rules
 
uni-man
Member
 
Total Posts:  34
Joined:  2008-04-04
 

Hi
We operate both a wholesale and retail business from the same web site. Currently Magento supports a percentage discount on the retail price using catalog price rules: this is very easy to set up (thanks!)
We have created hidden categories “Retail minus 10%”, “retail minus 20%”, ‘Retail minus 30%” etc with appropriate price rules, and then added products to each category based on our margins.

But some wholesale customers are special: we give them “Cost plus 20%” (or whatever) across a range of products. It would be very handy to have this as an option on the catalog price rules.

I rummaged in the source code for an hour or so but it looks like there is no simple way to extend the pricing rules with our own custom ones. Either creating an event, or making little subclasses for by_percent, to_percent etc with the option to dynamically load others would allow us to create any price rule we liked…

thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
keberg99
Jr. Member
 
Total Posts:  1
Joined:  2008-07-06
 

I have the same problem. Have you found a solution?

 
Magento Community Magento Community
Magento Community
Magento Community
 
uni-man
Member
 
Total Posts:  34
Joined:  2008-04-04
 

no… the code is written with a lot of switch/case statements in a not-very-extensible way.
the only way to create this functionality would be to edit the core code, which I’m reluctant to do because magento is still under rapid development. I have put in a feature request with a suggestion that they refactor it using dynamically loadable methods to make it extensible

 
Magento Community Magento Community
Magento Community
Magento Community
 
seudo
Guru
 
Avatar
Total Posts:  344
Joined:  2008-04-21
 

This would be a great feature for us as well.

 
Magento Community Magento Community
Magento Community
Magento Community
 
l781
Sr. Member
 
Total Posts:  109
Joined:  2008-11-09
 

yes, it is interesting to me too - any news on this topic?

 
Magento Community Magento Community
Magento Community
Magento Community
 
htleetw
Jr. Member
 
Total Posts:  8
Joined:  2009-02-11
 

We, like many other wholesalers, need this “cost plus pricing” feature too!

 
Magento Community Magento Community
Magento Community
Magento Community
 
xondeo
Member
 
Total Posts:  40
Joined:  2009-04-08
 

+1

Yes, it would be great.

 
Magento Community Magento Community
Magento Community
Magento Community
 
tnemrap
Jr. Member
 
Total Posts:  2
Joined:  2009-11-16
 

+1

Realy need this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
epli.is
Jr. Member
 
Total Posts:  9
Joined:  2010-03-23
 

+1

Been trying to find a solution for a long time… hope someone has it!

 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 

I find your post by chance…

I think I have the solution for you, even at the 1 customer = 1 special price

If you are still interested, let me know!

Regards!

 
Magento Community Magento Community
Magento Community
Magento Community
 
isitfree
Jr. Member
 
Total Posts:  2
Joined:  2011-02-23
 

+1
need a solution for that

amartinez, what can you suggest?

 
Magento Community Magento Community
Magento Community
Magento Community
 
amartinez
Guru
 
Avatar
Total Posts:  347
Joined:  2008-11-14
Spain
 

this method may be right:

1/ from your ERP-CRM-ACCOUNT SYSTEM export your customers and his special price rules

2/ them, export your products & base prices

3/ Import customers and products to your website

4/ in your website again, create an additional custom price table, use some SQL file like:

SET SQL_MODE=NO_AUTO_VALUE_ON_ZERO;
USE 
magento_store_database;
DROP TABLE IF EXISTS amartinez_custom_prices;
CREATE TABLE amartinez_custom_prices (
  
customer varchar(15),
  
product_id varchar(15),
  
minimal_qty varchar(15),
  
price varchar(15),
  
discount_1 varchar(15),
  
discount_2 varchar(15),
  
discount_3 varchar(15),
  
some_other_price varchar(15),
  
KEY customer (customerproduct_id)
ENGINE=MyIsam DEFAULT CHARSET=utf8;
insert into amartinez_custom_prices values("-1","0003.0119","15","1.5649999999999999","10","0","0","1.41");
insert into amartinez_custom_prices values("-1","0003.0120","15","2.0529999999999999","10","0","0","1.84");
insert into amartinez_custom_prices values("-1","0003.0121","15","2.5099999999999998","10","0","0","2.26");
...

5/ extend magento price model by creating and editing app/code/local/Mage/Catalog/Model/Product/Type/Price.php. I suggest to edit these functions: getPrice, getFinalPrice and getTierPrice

all these steps can be automatized

I have this solution working smile

What do you think?

 
Magento Community Magento Community
Magento Community
Magento Community
 
clayman80
Jr. Member
 
Total Posts:  23
Joined:  2010-02-20
 

I still find it hard to believe that Magento doesn’t come with an ability to create a Catalog Price Rule based off of an attribute such as cost right out of the box…

 
Magento Community Magento Community
Magento Community
Magento Community
 
FMEExtensions
Mentor
 
Avatar
Total Posts:  1298
Joined:  2009-08-07
 

Hello All,

We have a solution for this

Looking forward to feedback now magento price markup

 
Magento Community Magento Community
Magento Community
Magento Community
 
AndyRobins
Jr. Member
 
Avatar
Total Posts:  23
Joined:  2011-12-22
 

I have got just the right solution for this problem. It’s an extension I came across some time back and i’ve been using it ever since. It works perfect for the Magento Custom Price option. Anyone interested can find it here: http://bit.ly/magentocustomprice

 
Magento Community Magento Community
Magento Community
Magento Community
 
bgaiteiro
Jr. Member
 
Total Posts:  7
Joined:  2010-03-18
 

Hi.

Needed this feature too for a client and forked the core with a very straight forward solution.

In app/code/core/Mage/Catalog/Model/Product/Type/Price.php

1 . Replaced the Public function getPrice for this one

/**
     * Default action to get price of product
     *
     * @return decimal
     */
    public function getPrice($product)
    
{
    $product 
Mage::getModel(\\\'catalog/product\\\')->load($product->getId());
        return 
$product->getData(\\\'cost\\\') * $product->getMarkup();
    
}

2. Placed the new file in local… app/code/local/Mage/Catalog/Model/Product/Type/Price.php

3. Eliminated the Product atribute Price in every Attribute Sets (not necessary, just for my client do not mistake)

4. Populated the cost attribute with the prosuct costs, and changed to Required

5. Created a new one and added to all Attribute sets, named Markup (code \\\"markup\\\") and set to required

Now the store capture the cost and multiply the markup.

Thats it

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 2