Custom PHP code

Hello. I have a PHP code that i want to put into every item descrpiton. What the code should do is basically get the item price and do a math as u can see int the code below.



Can someone please help me with this? Where should i put the code?



```php
$preco = strip_tags($product.price);
$preco = str_replace(".", "", $preco);

$taxa1 = 1;
$taxa2 = 0.51495;
$taxa3 = 0.34670;
$taxa4 = 0.26255;
$taxa5 = 0.21210;
$taxa6 = 0.17847;
$taxa7 = 0.15446;
$taxa8 = 0.13645;
$taxa9 = 0.12246;
$taxa10 = 0.11127;
$taxa11 = 0.10212;
$taxa12 = 0.09450;
?>





























a vista 7 x
2 x 8 x
3 x 9 x
4 x 10 x
5 x 11 x
6 x 12 x


```

You can’t parse smarty tags inside any text input fields. We’ve asked CS for this functionality for the last 2.5 years and they won’t listen. What makes this even more embarrassing to CS is that Xcraaaap has has this type of functionality for years. You will have to hack the correct tpl/php files instead.



For reference have a look at:

[url]Search Results for "docsv2" | Smarty

Thank you for ur response. Unfortunately im in no way a php expert and i just cant understand what these docs says. If u could gimme some noob friendly how to i will really appreciatte. Anyways, thanks for answering mate.

I’ve made an addon for this. Hope it helps.

[quote name=‘gginorio’]I’ve made an addon for this. Hope it helps.[/QUOTE]



Hello gginorio. I really appreciatte all your effort on helping me on this. I really mean it. However, maybe i was not clear enough.



Let me try to be more clear now :smiley:



So, here in Brazil we can pay using our credit cards in monthly instalments (until 12).



So, what i really want is a tabel which simulate the total before the customer gets redirected to the gateway.



The original price should be keep and the the table will show how much the item will cost in 2, 3, 4 and so on instalments.



Those taxes in the script is the “interest rate” for each instalment.



Im adding an attachment so if u can check and help me i will appreciatte.



Ps: It will only show until the instalment 8 for this item cause each instalment should be more than $5.

Example.zip

This is the updated version. It’s a Multiple Payments addon.

One more time without the table showing up in the category view.