Page 1 of 1

Custom Variable question

PostPosted: January 28th, 2012, 8:14 am
by cassel
I pestered you for a while to get my Paypal button to include a custom variable to direct the customer to the correct Thank you page after transaction. So i have been using cv1 and it has worked fine but i just found out it is conflicting with WP Affiliate plugin (that integrates with s2M) as that plugin uses cv1 as the Affiliate ID. What happens is that i get my s2M variable when i try to check which affiliate generated the sales!

So the question is this one: in the Paypal button, can i use cv2 as my custom variable for the Thank you page and skip the cv1?

Re: Custom Variable question

PostPosted: January 29th, 2012, 3:59 pm
by Raam Dev
Are you using the free version of s2Member? With s2Member Pro, you can use the success= shortcode attribute to control where the user is sent after checkout.

If you're using some custom process where you grab the value of the Custom Variable after checkout to perform the redirect, then I don't see why you couldn't use the cv2 variable to do the same thing.

Re: Custom Variable question

PostPosted: January 29th, 2012, 4:11 pm
by cassel
Yes,i have the pro version but i cannot use just the success= shortcode since the page i want to send the customer will depend on the actual product they just purchased so i used custom="scrapbookcampus.com|success-basic" and cv1="success-basic" (for another product, the cv1 is different).

My concern is whether putting cv2="success-basic" will mess up whether s2M will be looking for cv1 since the explanations in the s2m documentation uses this example: custom="scrapbookcampus.com|cv1|cv2|cv3|etc". So, is it ok to expect it to use the cv2 without a cv1 in the custom link?

Re: Custom Variable question

PostPosted: January 30th, 2012, 10:36 pm
by Cristián Lávaque
No, you can't have cv2 without having cv1 first. I'm pretty sure you can leave cv1 empty if you really want to use cv2 instead, though: custom="scrapbookcampus.com||success-basic".

Re: Custom Variable question

PostPosted: January 30th, 2012, 10:47 pm
by cassel
Will that lead to the same URL with that custom= ?
I think it might be important to mention, somewhere in the documentation, the fact that cv1 MIGHT be used by another plugin, and how to get around that.

Re: Custom Variable question

PostPosted: January 30th, 2012, 10:53 pm
by Cristián Lávaque
What other plugin? I thought you were using cv1 in your own customization and that's why you prefered cv2 for this new use.

The custom field doesnt' affect the success attribute for the return page. I imagine you're planning to have a custom script that based on the value of your cv2 variable, you'd decide what return page to use.

I'm not sure what you've got already, so I can't say for sure, but I know that the cv vars won't affect the success attribute on their own.

Does that help?

Re: Custom Variable question

PostPosted: January 30th, 2012, 10:57 pm
by cassel
I used cv1 for s2Member until i used WP Affiliate (which is said to integrate with s2M since they have the detailed instructions to do so) and i ended up with a list of affiliate ID as success-basic and success-element! When i contacted them, they explained that the plugin uses cv1 for the affiliate ID! so i am stuck since both s2M and WP Affiliate use the same custom variable for different things. So, i am hoping that using cv2 for s2M will solve the problem.

Re: Custom Variable question

PostPosted: January 31st, 2012, 2:36 am
by Cristián Lávaque
Ah! Got ya.

Well, it'd be good that you tell the WP Affiliate guys what you're trying to do now so they tell you if it'd conflict with the integration they created.