eberswine
Forum Replies Created
-
Ok, here is what I did to accomplish this.
** disclaimer ** There is much better ways to achieve this. This is very straight forward using the “template” method
Made a template in your theme folder ( copied the one in the plugin folder )
/woocommerce/print-order/print-content.php
All I added was a quick query to grab the “coupon code” if it exists:
At the end of the <table> I inserted this code:
<?php if( $order->get_used_coupons() ) { $coupons_count = count( $order->get_used_coupons() ); echo '<div style="padding:5px; background-color: #eaeaea;"><h4 style="margin-top:10px;">' . __('Coupons used') . ' (' . $coupons_count . ')</h4>'; echo '<p><strong>' . __('Coupons used') . ':</strong> '; $i = 1; $coupons_list = ''; foreach( $order->get_used_coupons() as $coupon) { $coupons_list .= $coupon; if( $i < $coupons_count ) $coupons_list .= ', '; $i++; } echo '<p style="padding:4px;"><strong>Coupons used (' . $coupons_count . ') :</strong> ' . $coupons_list . '</p></div>'; } // endif get_used_coupons ?>
Now it works perfect!! Just the way I want it to!
Still trying to get this to show up. I just updated to the latest release, but still no “coupon code” on PDF invoice, just the $dollar amount…
I am so close!!! I think I just need a few small edits!! Can anyone point me in the right direction ?
Thanks! What a great plugin! 5 stars!
Having the same problem. Found this ,.. what was your redirect that you used in .htaccess page to solve this ?
Forum: Plugins
In reply to: [PHPLeague] Problem with WP 3.5SO basically you need to change any “error ** prepare **” like this :
Copy the same format!
From
return $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->player"));
TO
return $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM $wpdb->player", null));
Forum: Plugins
In reply to: [GD Star Rating] [Plugin: GD Star Rating] Author only rating for Mult Set….use it in your template!
Forum: Plugins
In reply to: [GD Star Rating] [Plugin: GD Star Rating] Author only rating for Mult Set….RESOLVED
Just used this function:
wp_gdsr_show_multi_review(2,0,0,"meter-light",16)
Forum: Plugins
In reply to: [WP125] [Plugin: WP125] How to use it with more sidebars?Here is a simple solution:
Add this plugin:
PHP Code Widget
https://www.ads-software.com/extend/plugins/php-code-widget/And then drag that widget to your sidebar and then put this PHP code in to show your Sidebar WP125 ads!
<?php wp125_write_ads(); ?>