Support » Plugin: Jigoshop » [Plugin: Jigoshop] How to add Coupon to Orders page

  • Resolved morshah


    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:

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

    add the following:

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

    WordPress Version: 3.3.2
    Jigishop Version: 1.1.1

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