[SOLVED] CBSubs variable pricing plan based on other fields

11 years 9 months ago #207700 by D1on
Looks like I didn't need two query fields as your second query option worked, I just had to change ( `cb_gvp` * 0.035 ) to ( `cb_gvp` * -0.00035 ) to calculate the GVP field x 0.035% e.g.

SELECT ( `cb_gvp` * -0.00035 ) FROM `#__comprofiler` WHERE `id` = '[user_id]'

Without the -0.00035 it would reduce the amount, having "-" in the query results in a positive, not negative amount, confusing, but it works.

Thank you for your sample query formulas as I found it difficult to find any other CB query examples for this variable membership subscription requirement.

This is working great now.

Thank you!

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.158 seconds

Facebook Twitter LinkedIn