AbanteCart Community

eCommerce construction => Templates => Topic started by: Tim Norton on May 10, 2020, 11:24:48 PM

Title: Updating invoice template for stockpick
Post by: Tim Norton on May 10, 2020, 11:24:48 PM
Hi everyone. I have a request to modify the invoice to include one of the resource images that I have attached to each product.  I have read through all of the prior mentions of invoice modifications but none seem to be entirely clear on how to do this.

I need to know what is the default location of an invoice.tpl to modify, and what MySQL table is the full data located in so I need to know if I need to add a sql view or something to pull the data forward.

Basically, the simplest version of the query that identifies the image is:

SELECT resource_path  FROM `abe7_resource_map` A
LEFT JOIN `abe7_resource_descriptions` B ON A.resource_id = B.resource_id
WHERE sort_order = 2 and A.object_id = {product_id}

Any help would be appreciated.

Title: Re: Updating invoice template for stockpick
Post by: maxter on June 06, 2020, 11:51:48 AM
Here is the location of the invoice template:

But SQL are not handled in the template. You need to add this to the controller or better model: