There must be a cleaner way to do it, but I'm not that familiar with OpenCart (certainly not enough to know why it needs a whole 'nother language when it's already using PHP). What is the significance of [font=monospace]_Price[/font] versus [font=monospace]$Price[/font]?
As someone who hasn't the first idea how the system works (or is supposed to work, or even how it's supposed to be used for that matter), I would expect:
if({27}>54)
{
if({16}>74)
{
if({45}>24)
{
if({44}>54)
{
_Price = $Price + (({27}-54)*3) + (({16}-74)*3) + {38P} + (({45}-24)*3) + (({44}-54)*3);
}
else
{
_Price = $Price + (({27}-54)*3) + (({16}-74)*3) + {38P} + (({45}-24)*3);
}
}
else
{
if ({44}>54)
{
_Price = $Price + (({27}-54)*3) + (({16}-74)*3) + {38P} + (({44}-54)*3);
}
else
{
_Price = $Price + (({27}-54)*3) + (({16}-74)*3) + {38P};
}
}
}
else
{
if({45}>24)
{
if({44}>54)
{
_Price = $Price + (({27}-54)*3) + {38P} + (({45}-24)*3) + (({44}-54)*3);
}
else
{
_Price = $Price + (({27}-54)*3) + {38P} + (({45}-24)*3);
}
}
else
{
if ({44}>54)
{
_Price = $Price + (({27}-54)*3) + {38P} + (({44}-54)*3);
}
else
{
_Price = $Price + (({27}-54)*3) + {38P};
}
}
}
}
else
{
if ({16}>74)
{
if({45}>24)
{
if({44}>54)
{
_Price = $Price + (({16}-74)*3) + {38P} + (({45}-24)*3) + (({44}-54)*3);
}
else
{
_Price = $Price + (({16}-74)*3) + {38P} + (({45}-24)*3);
}
}
else
{
if ({44}>54)
{
_Price = $Price + (({16}-74)*3) + {38P} + (({44}-54)*3);
}
else
{
_Price = $Price + (({16}-74)*3) + {38P};
}
}
}
else
{
if({45}>24)
{
if({44}>54)
{
_Price = $Price + {38P} + (({45}-24)*3) + (({44}-54)*3);
}
else
{
_Price = $Price + {38P} + (({45}-24)*3);
}
}
else
{
if ({44}>54)
{
_Price = $Price + {38P} + (({44}-54)*3);
}
else
{
_Price = $Price + {38P};
}
}
}
}
to have the desired effect. But there would have to be a better way or it would be a very stupid system guaranteed to make any sane programmer skewer their eyeballs (in fact, even the original code looks worrying).