• Resolved jmbenito

    (@jmbenito)


    Hello,
    first, thanks and congratulation for this extension ! A great idea and realisation !
    I’ve a bug when a customer buy multiple woocommerce products. Each product is virtuel and gift card configured. When they receive mlultiple mail (one for each product), codes are ok, but only the first product name is on each mail.
    Is it a bug ? How can I solve this problem ?
    I hope some help because my client is not happy with me ??
    Sorry for my english …not my native laguage.
    Best regards
    (I bought Auto Send plugin)

    • This topic was modified 7 years, 1 month ago by jmbenito.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jmbenito

    (@jmbenito)

    I solve myself the problem ! This extension can not be use for more than one code.
    You can modify class.giftcardemail.php :

    Comment this :
    // $sql0=”SELECT post_id from $wpdb->postmeta where meta_key=’rpgc_numbers’ and meta_value like ‘%i:”.$giftCard.”;%'”;
    // $IDCOMM=$wpdb->get_var($sql0);
    // $sql1=”select order_item_name from ab_woocommerce_order_items where order_id=$IDCOMM”;
    // $PRODCOMM=$wpdb->get_var($sql1);
    Add this :
    $sql0a=”SELECT meta_value from $wpdb->postmeta where meta_key=’rpgc_numbers’ and meta_value like ‘%i:”.$giftCard.”;%'”;
    $META1=$wpdb->get_var($sql0a);
    $TABMETA=unserialize($META1);
    $KEYMETA=array_search($giftCard,$TABMETA);
    if (trim($KEYMETA)==””) $KEYMETA=0;
    $sql0=”SELECT post_id from $wpdb->postmeta where meta_key=’rpgc_numbers’ and meta_value like ‘%i:”.$giftCard.”;%'”;
    $IDCOMM=$wpdb->get_var($sql0);
    $sql1=”select order_item_name from ab_woocommerce_order_items where order_id=”.$IDCOMM.” limit “.$KEYMETA.”,”.($KEYMETA+1);
    $PRODCOMM=$wpdb->get_var($sql1);
    Then, you can buy more than one product with giftcard !

    Thread Starter jmbenito

    (@jmbenito)

    I hope that will help someone !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Multiple products bug’ is closed to new replies.