impactgareth
Forum Replies Created
-
Forum: Plugins
In reply to: [osTicket Connector] Contact Form 7 issuesThanks for your help Alex. This is now resolved.
FYI I needed to add the [attachments] code to the additional ‘mail’ tab of the contact form 7 template settings.
Cheers,
GarethForum: Plugins
In reply to: [osTicket Connector] Contact Form 7 issues*UPDATE* I’ve managed to assign the help topic to osticket via a hidden field now. I didn’t realise that I needed to use the osticket’s help topic numberical id – rather than the name of the help topic.
However, I still can’t get the file upload to flow through from the WP form to osticket.
The form field i am using is: [file osticket-attach filetypes:txt|doc|pdf limit:1mb]
The bridge setting value for ‘Attachments” is osticket-attach
when I reply to the open ticket via email directly attaching a file it does successfully attach the file to the reply in osticket. I just can’t get it to attach from the WP contact form.
Any help would be greatly appreciated.
Thanks,
GarethThanks Ewout.
The _no_watermark version must be defined somewhere in the WP backend (or have the ability to be defined surely?).
I appreciate it may involve additional custom/paid work.I guess my question in short is.. is there a shortcode that I can replace instead of $item[‘thumbnail’] in order to display the no_watermark version of the same product image (or another work around!).
ThanksHi Ewout,
This has been sorted now. It was a software issue my side (sizing problem not caused by the addon).
Thank you very much for the great support!
The 3.92 was just the trial-and-error figure which resulted in the correct size being displayed when the pdf is printed.
As you say, the image should be printed at the correct size at 300dpi.
Perhaps there is some sort of ‘fit to page’ adjustment within the DomPDF encoder itself?Thanks a lot Ewout!
For some reason the image size comes out slightly smaller than it should be when printed using the inches sizing method above. That is why I used the different method as a work around earlier.
IS there any reason for this?
The problem is that the image needs to be exact as it is for high spec printing.
Thanks
Thanks.
I’ve had a go at putting it into a string:
<?php $featured_image_data = wp_get_attachment_image_src($item[‘thumbnail_id’], ‘full’); ?>
<?php $img_width = $featured_image_data[1] / 3.92 ; ?>
<?php $resized_image = ‘<img src=”<?php echo $featured_image_data[0]; ?>” style=”width:<?php echo $img_width; ?>;”>’ ?><?php
echo str_repeat($resized_image, $item[‘quantity’]);
?>The PDF output is not pulling the image through properly (just displays a placeholder). I guess it is due to the opening and closing of php tags on the following line:
<?php $resized_image = ‘<img src=”<?php echo $featured_image_data[0]; ?>” style=”width:<?php echo $img_width; ?>;”>’ ?>
I’m not sure how to correct the above though. Any ideas?
I’ll then remove all the php opening/closing tags from each line as recommended 😉
Just one final query…
I want the image to be repeated on the packing slip based upon the quantity ordered.
I previously had the following code for the smaller thumbnail version:<?php
echo str_repeat($item[‘thumbnail’], $item[‘quantity’]);
echo $item[‘thumbnail’];
?>Is there any way to incorporate the updated code (see my last post) so that it is repeated in the same way?
Thanks
Perfect! Thanks so much Ewout.
For anyone wanting the code I ended up with, it is as follows:
<?php $featured_image_data = wp_get_attachment_image_src($item[‘thumbnail_id’], ‘full’); ?>
<?php $img_width = $featured_image_data[1] / 3.92 ; ?>
<img src=”<?php echo $featured_image_data[0]; ?>” style=”width:<?php echo $img_width; ?>;”>That works perfectly for that particular image size (i.e. 402px x 402px).
I will be incorporating various other sized images into the packing slip.
Is there a simple way of ensuring that all images will be shown at the correct size at 300dpi?, rather than just any 402px x 402px images.Thanks again for your great support on this.
Hi Ewout.
Thanks for that. I’m getting somewhere now!The full size image created using the code you gave above is appearing too large on the A4 PDF.
I presume that this is more to do with the DomPDF side of things and perhaps the DPI setting somewhere?The image is:
402px x 402px
300 dpiWhen I try and change the DPI setting in the dompdf_config.inc.php file to 300 (from the default 96) is produces a series of errors when trying to generate the PDF packing slip. e.g. the following:
Warning: Cannot modify header information – headers already sent by (output started at /var/sites/b/website.co.uk/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/lib/dompdf/dompdf_config.inc.php:1) in /var/sites/b/website.co.uk/public_html/wp-content/plugins/woocommerce-pdf-invoices-packing-slips/includes/class-wcpdf-export.php on line 232
Any ideas? So close! Thanks