Affiliate Coupon: How to get show_attributes=”coupons” displayed not in input box

Posted in

When we use this shortcode: [affiliates_affiliate_profile show_name=”” show_email=”” show_attributes=”coupons” /]
The result is Coupons and in a text input box the coupon data. How can I get only the coupon data showing, but not in an input box?
Also, how can I separate the values? Right now, I get coupon1,coupon2,coupon3. Is it possible to target 1 coupon at a time?
Thank you

3 Responses to Affiliate Coupon: How to get show_attributes=”coupons” displayed not in input box

  1. Steve March 18, 2016 at 1:54 pm #

    Hello Antonio,
    How do I separate the values that are within the “coupons” attributes? Right now I still get coupon1,coupon2,coupon3 in one bloc. Is it possible to target 1 coupon at a time? Something like
    [aff-show-attributes show_attributes=”coupons” show_data_1 /] : this would give me coupon1
    and
    [aff-show-attributes show_attributes=”coupons” show_data_2 /] this would give me coupon2
    etc.

    Thank you

    • antonio March 19, 2016 at 6:03 am #

      Hi Steve,
      You need to change the change the code to display your custom data. You could add in line 61, something like:

      if ( $key == 'coupons' ) {
      $coupons = explode( ",", $attrValue );
      if ( sizeof( $coupons ) > 0 ) {
      foreach ( $coupons as $coupon ) {
      $output .= esc_attr( $coupon ) . $sep;
      }
      }
      }

      I have not test this code, It’s only a reference to help you to create your own version.
      Kind Regards,
      Antonio B.

  2. antonio March 18, 2016 at 8:35 am #

    Hi Steve,
    you can use this alternative shortcode to display the information as lineal text.
    Kind Regards,
    Antonio B.

We use cookies to optimize your experience on our site and assume you're OK with that if you stay.
OK, hide this message.

Affiliates · Contact · Jobs · Terms & Conditions · Privacy Policy · Documentation · Downloads · Useful Plugins · My Account

Share