1cloudforall
Forum Replies Created
-
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Responsive HeightThank you! Works perfect!
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Responsive HeightThe date-filter is working perfectly!
But the item_count is still giving some problems.I’ve added the filter to the functions like you said and also downloaded the newest version from GitHub. But it seems like the function does count the items to early which results in “0”.
The filter I’ve added in functions:
add_filter( 'wpo_wcpdf_paper_format', 'wpo_wcpdf_paper_format_dynamic', 10, 3 ); function wpo_wcpdf_paper_format_dynamic( $paper_format, $document_type, $document = null ) { if (!empty($document) && !empty($document->order)) { $order_items = $document->order->get_items(); $item_count = count($items); // do your magic with the $item_count here, below example is all sizes in mm: $width = 102; $height = 120 + 4 * $item_count; //convert mm to points $paper_format = array( 0, 0, ($width/25.4) * 72, ($height/25.4) * 72 ); } return $paper_format; }
Whenever I put the item_count manualy instead of the $item_count, it works how it should.
$height = 120 + 4 * 11;
Thanks in advanced!
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Responsive HeightThank you, doesn’t work yet but I get the idea!
For the order time i’m using:
invoice.php:<tr class="order-date"> <th><?php _e( 'Order Date:', 'woocommerce-pdf-invoices-packing-slips' ); ?></th> <td><?php $this->order_date("Y/m/d \a\t g:i"); ?></td> </tr>
Forum: Plugins
In reply to: [PDF Invoices & Packing Slips for WooCommerce] Responsive HeightAlso, we are trying to get the order time shown on the PDF. But using Y/m/d \a\t g:i doesn’t seem to work. Is there another work around for this?
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Import Bug!Hi,
I’ve imported no more than 10 rows.
The import was completed correctly don’t get me wrong. It just keeps on sending queries. My thought is that it was looking for a Season that was no longer available, but a PHP script should always stop itself, put a error or just skip the query to prevent this kind of issues.
Forum: Plugins
In reply to: [SportsPress - Sports Club & League Manager] Point SystemHi,
I’ve figured it out ??
For someone with the same problem:
Put in “Event Outcomes” the possible places like:
First place, Second place, Third place, Fourth place etc.In “League Table Columns” fill in the following equation:
Outcome1 x Points given + Outcome2 x Points given + Outcome3 x Points given etc…First place x 25 + Second place x 18 + Third place x 15 + Fourth place x 12
(1st place given 25 points, 2nd place given 18 points, 3rd place given 15 points, 4th place given 12 points)- This reply was modified 8 years ago by 1cloudforall.