Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Gauravk Posted February 5, 2020 Posted February 5, 2020 We have a special need where we need to segregate users into 4 segments and each segment should have 3 subscription options. Showing 12 subscription in one page is confusing and overwhelming. So I am looking for a way to have subscription link that we can embed in a button and it fires to checkout page with invoice creation at backend. Hope it's possible? Thanks in advance.
Joel R Posted February 6, 2020 Posted February 6, 2020 You can maybe check out Pages SuperList by @opentype, so you can create the subscription pages using Pages.
Gauravk Posted February 6, 2020 Author Posted February 6, 2020 Thanks @Joel R for the great idea. I think I was mistaken that every time someone click on select option on subscription page it loads a different key. Just checked now and it loads same constant key with different ID of subscription. Can anyone please confirm if these keys are always constant? Then life will be very easy. subscriptions/12/?do=purchase&csrfKey=80ddb451cf44a14807f6285b8553989d subscriptions/1/?do=purchase&csrfKey=80ddb451cf44a14807f6285b8553989d subscriptions/6/?do=purchase&csrfKey=80ddb451cf44a14807f6285b8553989d
bfarber Posted February 6, 2020 Posted February 6, 2020 The key is the user's CSRF key so it's static, per-user per-session. Within templates, you can do {expression="\IPS\Session::i()->csrfKey"} or {url="..." csrf="true"} depending upon your needs.
Gauravk Posted February 6, 2020 Author Posted February 6, 2020 Thanks @bfarber, can you please make one URL, as Im not well verse with coding. Did you mean instead of this: subscriptions/6/?do=purchase&csrfKey=80ddb451cf44a14807f6285b8553989d Use this...? subscriptions/6/?do=purchase&{expression="\IPS\Session::i()->csrfKey"}
bfarber Posted February 7, 2020 Posted February 7, 2020 So you're trying to link to purchasing a subscription in a template I gather? If so, then you'd want to do {expression="(string) \IPS\nexus\Subscription::load( 6 )->url( 'purchase' )->csrf()"}
Gauravk Posted February 7, 2020 Author Posted February 7, 2020 Thanks @bfarber can you please tell me where do I place this line of code as Im sure I can't place them as a backlink on link button with spaces in URL. I intend of create 3 pages with 3 subscription option placed on each page to use above mention link/code
bfarber Posted February 10, 2020 Posted February 10, 2020 I don't know how to answer your question. You would place the line of code I gave you into a template - which template would depend upon specifically where you want to show the button/link. If you are creating a page in Pages or something along those lines, you can paste the code there instead.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.