Jump to content

Image.jpg or PDF = FunctionOf(productorder,orders left)


nubi86

Recommended Posts

Hello!

I'm new at prestashop. I have seen that a lot of things can be done by changing the source code :) but I've been all day (HONESTLY, ALL DAY :gulp: ) looking around and I didn't find a solution for this:

I want to send a personalized pdf for each order when it has been paid. I would like to add an image for each product that the customer bought. For example, if I have 300 products, I will generate 300 different images with different codes (like a different coupon code for each product), each image will have a name like "/product_A/item001.jpg".

I've been inspecting a bit and when the "payment received" status is changed, the customer receives an email which brings him to the "history.php". There if he clicks on the PDF button a pdf is generated by "pdf-invoice-php".
PDF

Another solution would be sending an email with the coupon images bought.
How should prestashop be changed so that I can manage my images :question: ¿?

Thanks a lot in advance! :-)

Link to comment
Share on other sites

Maybe an easier solution would be just by adding the image directly in the e-mail.

I would like to know were the variables {firstname}, {lastname}, etc are defined and payment.html uses to send the e-mail, so I could try to do it on my own...
I would create a variable {tempdir} to store the next direction of the image I want to send.

If someone could tell me if thats easy or it takes a lot of work... Or if someone knows someone or some company that would do that even if it's paying...

How much should they charge me for this?

Link to comment
Share on other sites

Ok I found an interesting e-mail template that can help me a lot. I changed the payment accepted status so that it sends the email template "order_conf" which has a lot of information.

.....HOWEVER.........

It doesn't fill all the fields
PLEASEE ANYONE¿?¿?¿? I'm sure it is not so difficult...

Here is part of it that works:
"Hello Albert Garcia, thank you for shopping with ShopName.
Order details
Order: #000003 placed on {date} "

Here is some part that doesn't work:
"Payment: {payment}
Reference Product Unit price Quantity Total price
{products} {discounts}
Products {total_products}
Discounts {total_discounts}
Gift-wrapping {total_wrapping}
Shipping {total_shipping}
Total paid 7 875,01 €
"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...