latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

“Invalid form configuration. Missing “ra” att

Home Forums Community Forum “Invalid form configuration. Missing “ra” att

This topic contains 3 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 5 months ago.

Topic Author Topic
Posted: Saturday Jul 20th, 2013 at 10:15 am #53730

I followed the instructions from here http://www.primothemes.com/forums/viewtopic.php?f=4&t=6172
I used Cristian’s version below

add_action('ws_plugin__s2member_pro_before_sc_paypal_form_after_shortcode_atts', 'my_dynamic_price', 10);

function my_dynamic_price($vars)
{
    $_GET['qty'] = isset($_GET['qty']) && is_numeric($_GET['qty']) && $_GET['qty'] > 1 ? (int) $_GET['qty'] : 1;
    $vars['__refs']['attr']['ra'] *= $_GET['qty'];
    $vars['__refs']['attr']['desc'] = strtr($vars['__refs']['attr']['desc'], array('%%My-Qty%%' => $_GET['qty'], '%%My-Price%%' => $vars['__refs']['attr']['ra']));
}
 

it calculates correctly the price and displays it on the description but I get this error
“Invalid form configuration. Missing “ra” attribute. The Regular Amount. Must be >= 0.01.”

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Sunday Jul 21st, 2013 at 8:24 am #53765

I don’t think this would make a difference, but you can try changing the [hilite mono]ra[/hilite] line to:

$vars['__refs']['attr']['ra'] = $vars['__refs']['attr']['ra'] * $_GET['qty'];

Or try the original code the user provided in his post: http://www.primothemes.com/forums/viewtopic.php?f=4&t=6172#p13189

Or don’t do it with hooks, and just modify the shortcode directly as explained here: Knowledge Base » Using Variables In A Shortcode

I hope that helps. :)

Posted: Monday Jul 22nd, 2013 at 4:23 pm #53825

Installed the PHP execution and did it that way. It now works.
Thank you for your time and interest in the matter.

Posted: Tuesday Jul 23rd, 2013 at 7:53 am #53874

Great! Thanks for the update. :)

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

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.