Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello, same issue, user role installed and all roles ok.

    Thread Starter jmbenito

    (@jmbenito)

    I hope that will help someone !

    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 !

Viewing 3 replies - 1 through 3 (of 3 total)