WordPress.org

Support

Support » Plugins and Hacks » Jigoshop » [Resolved] [Plugin: Jigoshop] How to add Coupon to Orders page

[Resolved] [Plugin: Jigoshop] How to add Coupon to Orders page

  • To add the coupon code under the discount on the orders page. The following steps were required:

    1. Open wp-content/plugins/jigoshop/admin/jigoshop-admin-post-types.php in text editor.

    2. Under the line:

    $order = new jigoshop_order($post->ID);

    add the following:

    $coupons = array();
    $order_discount_coupons = (array)$order->get_value_from_data(‘order_discount_coupons’);
    if( ! empty( $order_discount_coupons )) {
    foreach ( $order_discount_coupons as $coupon ) {
    $coupons[] = isset( $coupon[‘code’] ) ? $coupon[‘code’] : ”;
    }
    }

    3. Under the code:

    <tr>
    <th><?php _e(‘Discount’, ‘jigoshop’); ?></th>
    <td><?php echo jigoshop_price($order->order_discount); ?></td>
    </tr>

    add the following:

    <tr>
    <th><?php _e(‘Coupon’, ‘jigoshop’); ?></th>
    <td><?php echo implode( ‘,’, $coupons ); ?></td>
    </tr>

    WordPress Version: 3.3.2
    Jigishop Version: 1.1.1

    http://wordpress.org/extend/plugins/jigoshop/

  • The topic ‘[Resolved] [Plugin: Jigoshop] How to add Coupon to Orders page’ is closed to new replies.
Skip to toolbar