Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Images at PDF format invoice #1189

Merged
merged 2 commits into from
Mar 12, 2014
Merged

Images at PDF format invoice #1189

merged 2 commits into from
Mar 12, 2014

Conversation

JRomeoSalazar
Copy link
Contributor

Images are not showed at invoices with pdf format.

@stloyd stloyd added this to the 1.0.0-BETA1 milestone Mar 11, 2014
<a href="{{ path('sylius_product_show', {'slug': product.slug}) }}" class="thumbnail pull-left" style="margin-right: 15px;">
<img src="{{ product.image ? product.image.path|imagine_filter('sylius_90x60') : 'http://placehold.it/90x60' }}" alt="{{ product.name }}" />
<img src="{{ image }}" alt="{{ product.name }}" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is wrong. You should just call it:

{{ product.image ? product.image.path|imagine_filter('sylius_90x60', true) : 'http://placehold.it/90x60' }}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

His point is to have the full URL in the src attribute, so that the PDF transformation finds the image.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@winzou If you check diff and documentation you will see the "magic" true parameter with which the imagine_filter will generate absolute path to image.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see your true argument. This is indeed better but your previous comment could have been clearer :)

@stloyd stloyd removed the RFC label Mar 12, 2014
@JRomeoSalazar
Copy link
Contributor Author

I didn't know that parameter. Thanks @stloyd.

pjedrzejewski pushed a commit that referenced this pull request Mar 12, 2014
@pjedrzejewski pjedrzejewski merged commit 6e44b28 into Sylius:master Mar 12, 2014
@pjedrzejewski
Copy link
Member

Thank you Jorge!

@JRomeoSalazar
Copy link
Contributor Author

Great! :)
El 12/03/2014 19:32, "Paweł Jędrzejewski" notifications@github.com
escribió:

Thank you Jorge!


Reply to this email directly or view it on GitHubhttps://github.com//pull/1189#issuecomment-37446125
.

@JRomeoSalazar JRomeoSalazar deleted the pdf-images branch March 14, 2014 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants