When adding a kit, every item in that kit shows the following (exemple):
BPATIO - Patio
* HW5011 - Vis
Qté:200 x Kits:1= Qté totale:200
Is there a way in the template to change how this is displayed ? I thought it would be easy, just look up the translation string, which is AssociatedProducts and find the relevant section in the php template file, but no such string exists.
I’m looking to change it to something like:
BPATIO - Patio
* HW5011 - Vis
Qté 1 x Unités 200 = Qté totale: 200
Any tips ?
I still couldn’t find a way to change this on my side.
What template are you talking about?
A short search through the sources found 10 matches for “AssociatedProducts”.
I think ~/htdocs/core/lib/pdf.lib.php is what you are looking for.
Search for
foreach ($tmparrayofsubproducts as $subprodval) {
$libelleproduitservice = dol_concatdesc(
dol_concatdesc($libelleproduitservice, " * ".$subprodval[5].(($subprodval[5] && $subprodval[3]) ? ' - ' : '').$subprodval[3]),
(!empty($qtyText) ?
$outputlangs->trans('Qty').':'.$qtyText.' x '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1].'= '.$outputlangs->trans('QtyTot').':'.$subprodval[1]*$qtyText :
$outputlangs->trans('Qty').' '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1])
);
}
Hey, sorry, I didn’t play with dolibarr much in the last few weeks.
My template is in templates/facture/doc, I have a file named pdf_maincustom.modules.php.
There is no subprodval variable in there. I’d like to change how this is displayed, but not system wide, only for that specific template.
If there is no other way, I’ll backup that file and change it, but I’m guessing I’ll need to redo the changes on every other update.