Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted February 5, 20204 yr 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.
February 6, 20204 yr You can maybe check out Pages SuperList by @opentype, so you can create the subscription pages using Pages.
February 6, 20204 yr Author 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
February 6, 20204 yr 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.
February 6, 20204 yr Author 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"}
February 7, 20204 yr 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()"}
February 7, 20204 yr Author 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
February 10, 20204 yr 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.
Archived
This topic is now archived and is closed to further replies.