• Resolved 0kem

    (@0kem)


    Hi,

    When i use this plugin It does not show any of the options of each product. I sell customisable products so i need all of the picked options to display in the PDF invoice.

    I have used other invoice plugins which work well but i would like to be able to use this one as i prefer the look.

    I have orange highlights for these two options in the status:

    opcache For better performances No. Recommended for better performances
    GMagick or IMagick Better with transparent PNG images

    I am also using TM Product Options from CodeCanyon.

    Thanks in advance.

    Alex

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi!
    WooCommerce TM Extra Product Options has been having a lot of issues since WC3.0 was released (also outside of PDF invoices) and it seems like they’re only making a bigger mess with every update…

    The additional information from TM EPO should normally be added by TM EPO itself. It’s probably also missing from the email. There’s a setting that may help here in the TM EPO options: Global > Various > Prevent options from being sent to emails
    Try turning this off first, that would be the easy fix.

    If that doesn’t work either you can get the TM EPO data in the PDF ‘manually’ with a code snippet:

    
    add_action( 'wpo_wcpdf_after_item_meta', 'wpo_wcpdf_tm_epo_data', 10, 3 );
    function wpo_wcpdf_tm_epo_data ( $template_type, $item, $order ) {
    	if ( isset( $item['item']['tmcartepo_data'] ) ) {
    		$options = unserialize( $item['item']['tmcartepo_data'] );
    		$options_prices = array();
    		foreach ( $options as $option ) {
    			$option_info = array(
    				'name'  => !empty($option['name']) ? $option['name'] : '',
    				'value' => !empty($option['value']) ? $option['value'] : '',
    			);
    			if ( isset( $option['price'] ) ) {
    				$option_info['value'] .= ( $option['price'] > 0 ) ? ' +' . wc_price( $option['price'] ) : ' ' . wc_price( $option['price'] );
    			}
    			$options_prices[] = $option_info;
    		}
    		echo '<dl>';
    		foreach ($options_prices as $option_price) {
    			printf('<dt>%s:</dt><dd><p>%s</p></dd>', $option_price['name'], $option_price['value'] );
    		}
    		echo '</dl>';
    	}
    }
    

    Probably (hopefully) the code snippet won’t be necessary though!

    Let me know how that goes!
    Ewout

    Thread Starter 0kem

    (@0kem)

    Hi,

    I tried the first option you suggested but it didnt work.

    This was suggested by TM EPO too. I have been crawling their comments section and saw a few people having this same issue. They all seem to be from a long time ago though, no problems recently from what i can see. I hope its not just me!

    TM EPO has been really buggy for a while.

    Its weird because when i use another invoice plugin, it works fine. I just prefer to use your one as it looks nicer.

    Where do i add this code you have sent? is it in my functions PHP?

    Thanks

    Plugin Contributor Ewout

    (@pomegranate)

    Hi! Actually, I just heard from another customer with this same issue. It’s a core issue with TM EPO because the data is absent from the WC emails too. Apparently they have a fix:

    The team from themecomplete has sent us a hotfix for the issue with the WC emails and now your plugin is working again as expected as well.

    I recommend contacting the TM EPO support (themecomplete) to ask if they can send you that fix too (if they haven’t already pushed an update).

    Indeed I have seen this works in another PDF invoice plugin (from WooCommerce Booster) without any modifications, but the reason for that is simply because they have hardcoded a function similar to the one above in their plugin. This method has pros an cons and I prefer sticking to the official WooCommerce methods for optimal integration (if plugins do their job properly this actually results in better compatibility without any extra effort!)

    If you still want to use the code snippet, check out this guide: How to use filters

    Hope that helps ??

    have a fantastic weekend!

    Ewout

    Thread Starter 0kem

    (@0kem)

    Thanks for the replies Ewout. Im going to contact TM EPO and see what they say. Im definitely going to switch back to your plugin soon when ive found the fix. Its definitely the better invoice printing plugin.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Product options do not display underneath main product choice’ is closed to new replies.