Page 1 of 1

Vendor product cost

Posted: 13 Jan 2025, 19:52
by ghardin26
Using Phoca Cart 5.0.0Beta90
I am trying to figure out where I put my vendor/suppliers cost for a product? I need to be able to set sell prices based on product cost and that determines what my profit margin will be. Without a products landed cost, i can't know what my profits are.

Re: Vendor product cost

Posted: 15 Jan 2025, 23:25
by Jan
Hi, for now, there is no such option. Because eshop extension is not an accounting system, there is still discussion if this makes sense to have such field as it can confuse 99% of Phoca Cart users who don't use such feature. :idea:

Jan

Re: Vendor product cost

Posted: 15 Jan 2025, 23:58
by ghardin
A vendor/supplier cost does not need to be part of an accounting system. Simply put, how would a seller be able to calculate a sell price for a product if the cost of the product in not known?
Example: A site sells _ _. The supplier/vendor/manufacturer supplies a pair of _ _ for $10. If the cost is not a part of the product file, how would the seller know what to charge a buyer for the _ _ and make a profit? A simple addtion of a cost field would allow for that and the seller could make the sell price calculation on their own.
Ideally, a sell price field would be the calculated result of the cost field multiplied by profit multipler. , such as costfield x 1.30 markup = sell price of $13. (or a margin calculation by dividing by .7)
If the vendor/supplier had a price increase and the seller was not aware of the increase, then his sell price might remain the same and his profit margin on the product would be less. It could be acceptable if the store has only a few products, updating costs is pretty easy. But if the site has hundreds of products, that task is exceptionally difficult.
EVERY business needs to know what it's profits are in order to stayt in business. product costs are a vital part of running a business.
Here is a simple script created by ChatGpt to calcluate a sell price form a cost. It should be easy to incoproate this into Phoca Cart
<?php
function calculateSellPrice($costPrice, $profitMargin) {
if ($costPrice < 0 || $profitMargin < 0) {
return "Cost price and profit margin must be non-negative values.";
}

// Calculate the sell price
$sellPrice = $costPrice * (1 + $profitMargin / 100);
return round($sellPrice, 2); // Round to 2 decimal places
}

// Example usage
$costPrice = 100; // Enter the cost price here
$profitMargin = 25; // Enter the profit margin percentage here

$sellPrice = calculateSellPrice($costPrice, $profitMargin);
echo "Cost Price: $$costPrice\n";
echo "Profit Margin: $profitMargin%\n";
echo "Sell Price: $$sellPrice\n";
?>