David Jensen
Forum Replies Created
-
Yes just replace this line:
add_action( 'woocommerce_proceed_to_checkout', 'child_wc_cart_pdf_button', 21 );
With this:
add_action( 'woocommerce_before_cart', 'child_wc_cart_pdf_button' );
Alright cool, you can remove the green background by removing the ‘button’ class from the
a
element.Forum: Plugins
In reply to: [WooCommerce Cart PDF] PDF and TM extra product optionsHey can you try this CSS?
dt { font-weight: bold; } .tc-hidden-variation { display: none; }
According to mPDF docs the
dd
anddt
elements are block and cannot be set to inline, so the field name and value will be on separate lines.Hmm it’s working on my end. Are you placing the code in your child themes functions.php?
Oops I modified the code above, please copy the new code above and try again.
Yeah you would have to add something like this to your functions.php:
function child_wc_cart_pdf_button() { if( ! is_cart() || WC()->cart->is_empty() ) { return; } ?> <a href="<?php echo esc_url( wp_nonce_url( add_query_arg( array( 'cart-pdf' => '1' ), wc_get_cart_url() ), 'cart-pdf' ) );?>" class="cart-pdf-button" target="_blank" title="<?php esc_attr_e( 'Your title here', 'wc-cart-pdf' ); ?>"> <img src="//test.pahedomotica.nl/wp-content/uploads/pdf-logo-50px.png" alt="<?php esc_attr_e( 'Alt tag here', 'wc-cart-pdf' ); ?>" width="50" height="50" /> </a> <?php } add_action( 'woocommerce_proceed_to_checkout', 'child_wc_cart_pdf_button', 21 ); remove_action( 'woocommerce_proceed_to_checkout', 'wc_cart_pdf_button', 21 );
You probably won’t need the additional CSS I provided earlier
- This reply was modified 4 years, 6 months ago by David Jensen.
- This reply was modified 4 years, 6 months ago by David Jensen.
Hello
Can you try the following CSS
a.button.cart-pdf-button { appearance: none; background: url( 'https://test.pahedomotica.nl/wp-content/uploads/pdf-logo-50px.png' ); background-size: cover; width: 50px; height: 50px; display: inline-block; text-indent: -500px; overflow: hidden; vertical-align: middle; font-size: 0px; }
Forum: Plugins
In reply to: [WooCommerce Cart PDF] PDF and TM extra product optionsHmm ok I’ll look into this
Forum: Plugins
In reply to: [WooCommerce Cart PDF] PDF and TM extra product optionsTry removing the .woocommerce before the selectors
td.product-name dl.variation dt {
font-weight: 700;
}td.product-name dl.variation p, td.product-name dl.variation:last-child {
margin-bottom: 0;
padding: 0 !important;
margin: 0 !important;
}Forum: Plugins
In reply to: [WooCommerce Cart PDF] PDF and TM extra product optionsHello
Yes you can do this by applying a PDF stylesheet override in your child theme. Copy the stylesheet file from wp-content/plugins/wc-cart-pdf/templates/pdf-styles.php and place it in your child theme folder wp-content/themes/your-theme-slug/woocommerce/wc-cart-pdf/pdf-styles.php. From there you will modify the copied pdf-styles.php file and append your additional CSS. Let me know if you need additional help with this
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Move button to the top of the cartHi Ron
You can move the button up using the following in your child theme functions.php
remove_action( 'woocommerce_proceed_to_checkout', 'wc_cart_pdf_button', 21 ); add_action( 'woocommerce_before_cart', 'wc_cart_pdf_button' );
Forum: Plugins
In reply to: [WC Variations Radio Buttons] Has this been abandoned?@mantish I would be interested in helping bring this plugin back to life. If you are up for it email me at [email protected] and I can submit a pull request for your review
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Images aren’t of my productsHello
The thumbnails URLs are retrieved the same way WooCommerce retrieves them on the cart page, so I am not sure off the top of my head. Would you mind sharing a URL to your site? You can email me at [email protected]
Forum: Plugins
In reply to: [WooCommerce Cart PDF] Custom PDF@qwe7410 Yes absolutely. My previous reply above is the method to do this, but there are also a few hooks on the template itself to inject content without overriding the entire template. I would be happy to help you out if you want to email me at [email protected] we can get you sorted
Forum: Plugins
In reply to: [WooCommerce Cart PDF] ERR_INVALID_RESPONSEGlad to hear that!