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

Price and special price calculated from Cost
 
dork99
Jr. Member
 
Total Posts:  9
Joined:  2009-10-15
 

Price and special price calculated from Cost

Hello everybody, so this is the plan, I want the price and special price to be dependent of the cost.
I have added 2 extra attributes (set to mandatory) to my attribute set:  factor-price and factor-specialprice.

So the price needs to become cost*factor-price and the specialprice needs to become cost*factor-speciaalprice .

Now I think I will have to adjust the following file to get this done (I found an earlier post on the magento forum http://www.magentocommerce.com/boards/errors.php/viewthread/9933/P15/#t407868)

app/code/core/Mage/Catalog/Model/Product/Type/Price.php .…but I am not a programmer…can anybody give me a hint (a big one) what should be altered in this file to get this to work?

Thanks

Dork

 
Magento Community Magento Community
Magento Community
Magento Community
 
cocos
Jr. Member
 
Total Posts:  24
Joined:  2009-12-11
South Korea, Seoul
 
dork99 - 11 November 2012 09:53 AM

Price and special price calculated from Cost

Hello everybody, so this is the plan, I want the price and special price to be dependent of the cost.
I have added 2 extra attributes (set to mandatory) to my attribute set:  factor-price and factor-specialprice.

So the price needs to become cost*factor-price and the specialprice needs to become cost*factor-speciaalprice .

Now I think I will have to adjust the following file to get this done (I found an earlier post on the magento forum http://www.magentocommerce.com/boards/errors.php/viewthread/9933/P15/#t407868)

app/code/core/Mage/Catalog/Model/Product/Type/Price.php .…but I am not a programmer…can anybody give me a hint (a big one) what should be altered in this file to get this to work?

Thanks

Dork

First of all, the attribute code should be like this.

factor_price
factor_specialprice

Use the underbar(_) not hypen(-)


and then HINT smile

/* Before */
public function getPrice($product)
{
     
return $product->getData('price');
}

/* After */
public function getPrice($product)
{
     
return $product->getCost() * $product->getFactorPrice();
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
Amasty
Mentor
 
Avatar
Total Posts:  3988
Joined:  2009-11-10
 

Hi!
With Mass Product Actions Extension you can increase/decrease prices based on cost. You can do it in bulk too.

To see user guide and live demo please follow the link http://amasty-new.apps.sty/mass-product-actions.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
rebeccama
Sr. Member
 
Avatar
Total Posts:  110
Joined:  2012-11-05
 

Here is the extension which allows you to define price as cost + profit.
http://www.fmeextensions.com/magento-percentage-pricing.html

 
Magento Community Magento Community
Magento Community
Magento Community
 
mickjo
Jr. Member
 
Total Posts:  4
Joined:  2013-10-15
 

Take a look to Advanced Admin Products Manager and Mass Prices Updater this both extensions has wide range of features to manage prices (price, cost, msrp, special price and etc.) in bulk with different way to increase/decrease prices.

 
Magento Community Magento Community
Magento Community
Magento Community
 
serpyre
Enthusiast
 
Avatar
Total Posts:  771
Joined:  2013-05-20
 

Magento uses a hardcoded picing mechanism, it is not ideal as it causes currency exchange and COGS (Cost of Goods Sold) issues as pointed out, we have Dynamic Pricing, unforuntately Magento is not ideal at the business pricing solution it uses being primarily a technical problem.

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