I'm writing a shopping cart module, and in a number of places I need to redirect to my "cart" page ... I can redirect to the modules "cart" action, but how does this relate to pages in the site, which page will it use, or does it just use the default template and no page at all (that seems to be what's happening).
Really I just want to redirect to a page the user has selected as their checkout page... how would I go about doing this, can I exposed some functionality for selecting a page from a drop down list and store it in user preferences... are there any existing modules I could look at for examples?
Cheers,
- Alex
page reference
- Elijah Lofgren
- Power Poster
- Posts: 811
- Joined: Mon Apr 24, 2006 1:01 am
Re: page reference
I recently added a way to store a default page in Calendar: http://viewsvn.cmsmadesimple.org/viewsv ... r&view=revbittercoder wrote: I'm writing a shopping cart module, and in a number of places I need to redirect to my "cart" page ... I can redirect to the modules "cart" action, but how does this relate to pages in the site, which page will it use, or does it just use the default template and no page at all (that seems to be what's happening).
Really I just want to redirect to a page the user has selected as their checkout page... how would I go about doing this, can I exposed some functionality for selecting a page from a drop down list and store it in user preferences... are there any existing modules I could look at for examples?
Cheers,
- Alex
In this change: http://viewsvn.cmsmadesimple.org/viewsv ... module.php
the main code is this:
Code: Select all
$contentops =& $gCms->GetContentOperations();
$this->smarty->assign('defaultcalendarpage_text', $this->Lang('defaultcalendarpage'));
$this->smarty->assign('defaultcalendarpage_input', $contentops->CreateHierarchyDropdown('', $this->GetPreference('defaultcalendarpage','')));
Code: Select all
<div class="pageoverflow">
<p class="pagetext">{$defaultcalendarpage_text}:</p>
<p class="pageinput">{$defaultcalendarpage_input}</p>
</div>
Code: Select all
$this->SetPreference('defaultcalendarpage', $_POST['parent_id']);
Elijah
Note: I don't have time to take on any more projects. I'm quite busy. I may be too busy to reply to emails or messages. Thanks for your understanding. 
