Creating A Subscriptions Page

alt=
Reginald
@reginald
10 years ago
14 posts
Hi, I am using the Nova Light Skin, and I want to create a page for my jamroom site that shows the different accounts (quotas) that can be signed up too. I can design the page but how do I get the page onto my site maybe as a preview or located on the homepage somewhere.

Thanks in Advance.
updated by @reginald: 07/18/15 01:31:27PM
michael
@michael
10 years ago
7,799 posts
if you put any new .tpl file into your skin (its advisable to clone the skin first and give it a new name)
ACP -> TOOLS -> DEVELOPER TOOLS -> CLONE SKIN

Give it a name with a 2 letter prefix, since its not going into the marketplace, xx would do:
xxYourName

Then all changes from that point on wont be effected by updates.

Your skin will appear in the filesystem at:
/skins/xxYourName

and if you want a new url, then just add that url's name as a template
/skins/xxYourName/subscription.tpl

will show up at:
your-site.com/subscription

If you want to include the header and footer, then add
{jrCore_include template="header.tpl"}

// all your stuff shows up here.

{jrCore_include template="footer.tpl"}

If you want to add a new .css file rather than add to the ones that exist already, you add the name of it into
/skins/xxYourName/include.php

inside the _init() function, there are others there already:
function jrNovaLight_skin_init(){
    // Bring in all our CSS files
    jrCore_register_module_feature('jrCore','css','jrNovaLight','core_html.css');
    jrCore_register_module_feature('jrCore','css','jrNovaLight','core_grid.css');
    jrCore_register_module_feature('jrCore','css','jrNovaLight','core_site.css');
    jrCore_register_module_feature('jrCore','css','jrNovaLight','core_page.css');
.......
so add the name of the .css file you've added, then add that file to
/skins/xxYourName/css/whatever.css

and the CSS will come out. (might need to put the site into developer mode or clear the caches after each change so you can see it happening.)

"Clear the Cache"
ACP -> CORE -> TOOLS -> RESET CACHE

"Developer mode"
ACP -> TOOLS -> DEVELOPER TOOLS -> GLOBAL CONFIG -> Run in developer mode

Developer mode stops the caching system from running.

So that should get you to the point of being able to add things to the page.

From there the FoxyCart module has a smarty function to get the url your after:
{jrFoxyCart_subscribe_url quota_id="1"}

The function by itself will return the url for the user to click on to signup to that subscription. You can put it wherever you need to put it.

maybe in a link like this:
<a href="{jrFoxyCart_subscribe_url quota_id=3}"><div class="button_sml orange">Monthly Subscription @ $29</div></a>


---
If its not a 1 off kind of thing, and you wanted to go get all the subscribable quotas too, then this function would be useful:
{jrFoxyCart_subscribable_quotas assign="subscribable"}

That would go and get all the quotas that allowed subscriptions and return them as an array.

so the full loop could be:
{jrFoxyCart_subscribable_quotas assign="subscribable"}
{foreach $subscribable as $quota}
<a href="{jrFoxyCart_subscribe_url quota_id=`$quota.quota_id`}"><div class="button_sml orange">{$quota.quota_name}/div></a>
{/foreach}

or it might be {$quota.quota_jrProfile_name}, not sure. but if you put a {debug} in there you will be able to see what variables you have available.

"{debug}"
http://www.jamroom.net/the-jamroom-network/documentation/development/1477/debug

Tags