David Jensen
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce Cart PDF] ERR_INVALID_RESPONSEHello
I would be happy to help you troubleshoot. I will need to look at the error log on your server, would you mind contacting me at [email protected] and I can investigate?
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Change PDF prefixHello
Yes there is a filter you can use to change the name, in your case you can use the following and place it in your child themes functions.php file
/** * Change WC Cart PDF filename * * @return string */ function child_theme_wc_cart_pdf_filename( $filename ) { // Do not append .pdf extension return 'nameofsite-' . date( 'Ymd' ) . bin2hex( openssl_random_pseudo_bytes( 5 ) ); } add_filter( 'wc_cart_pdf_filename', 'child_theme_wc_cart_pdf_filename' );
I’m going to mark as resolved since there has been no activity
I would be happy to help troubleshoot this, it looks like the plugin is not active now though. I will need to be able to reproduce this issue to be able to determine the cause and provide a fix. If you wouldn’t mind emailing me at [email protected] we can proceed using a more private channel.
Hey were you able to get this working?
If the cart item data is present it will display on the PDF. I suggest you use the WooCommerce function
wc_get_formatted_cart_item_data
to display your cart data instead of using your own loop.See here
If you don’t want to use this function, simply create a new function and attach it to the hook here like this:
function your_function_name( $cart_item, $cart_item_key ) {
print_r( $cart_item ); // Output all cart item data
}
add_action( ‘woocommerce_after_cart_item_name’, ‘your_function_name’, 10, 2 );
- This reply was modified 4 years, 9 months ago by David Jensen.
What hook are you using to add the product data to the WooCommerce cart?
In the PDF you can hook into this to display your cart data:
do_action( 'woocommerce_after_cart_item_name', $cart_item, $cart_item_key );
And it also renders the cart item data used natively by WooCommerce if you would like to do it this way
echo wc_get_formatted_cart_item_data( $cart_item ); // PHPCS: XSS ok.
- This reply was modified 4 years, 9 months ago by David Jensen.
Hello
Is this a custom integration of the product addons? If it is not what plugin are you using to add the product options? I would be happy to help you sort this out, though I might need additional information as well as access to your website to integrate the options on the PDF.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Product images are mission on PDFIt looks like you are using Apache, try setting an authentication exception for the folder where your images are located, something like this:
AuthType Basic
AuthName ‘Authentication required’
AuthUserFile /app/www/.htpasswd# Allow access to excluded diretories
SetEnvIf Request_URI “^/wp-content/uploads/(.*)$” noauth=1
<RequireAny>
Require env noauth
Require env REDIRECT_noauth
Require valid-user
</RequireAny>You will need to adjust the AuthUserFile to where your .htpasswd is located as well as the Request_URI where your images are.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Product images are mission on PDFHi
I can’t say for sure without looking at your website. Would you mind sharing the URL, you can email me at [email protected] if you prefer not to publicly disclose.
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Error with Mpdf\MpdfExceptionHello
I am not seeing this error when viewing the cart PDF. Did you already get this resolved or have you narrowed this down at all to a specific use case?
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Custom PDFHello
Yes you can certainly accomplish what you are looking to do. You can customize the PDF template by copying the plugin template file cart-table.php into your child theme folder woocommerce/wc-cart-pdf/cart-table.php
Once it is there, you can modify the file according to your needs.
Let me know if you need further assistance
Forum: Plugins
In reply to: [WooCommerce Cart PDF] RTL Support & Login & Registration FeatureThanks!
Forum: Plugins
In reply to: [WooCommerce Cart PDF] RTL Support & Login & Registration FeatureHello
I have just released version 2.0.0 of this plugin which supports RTL and Arabic characters.
Here is a code snippet you can use to replace the Download Cart as PDF button, to require the user to login before downloading their cart. Simply place this inside your themes functions.php file:
https://github.com/dkjensen/wc-cart-pdf/wiki/Require-user-to-login-before-downloading-cart
Let me know if this works for you or if you need any further customization
- This reply was modified 5 years, 1 month ago by David Jensen.
- This reply was modified 5 years, 1 month ago by David Jensen.
- This reply was modified 5 years, 1 month ago by David Jensen. Reason: Link to github wiki
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Split table on several pagesThat was going to be my other recommendation, glad you got it working!