[pmwiki-users] WikiSh Shopping Cart recipe

marcus prima at wordit.com
Wed Apr 16 03:47:52 CDT 2008


Peter & Melodye Bowers wrote:
> Here's a very rough proof-of-concept idea using WikiSh

Many Thanks Peter. WikiSh looks as though it could do the job. The 
generate form feature is a great idea because you can just edit the item 
list without messing with forms. I tried the code and there are two issues:

1) The generate form button, which would be the link to the order page 
in a real shop, does not redirect to Shop.Form. How do you add that? I 
tried and could not get the redirect to work at all. Trying to save the 
code in pmwiki containing "REDIRECT target=page"  actually redirects to 
the page without saving the data.

Try this:

{(wikish_form QUICKFORM PROCESS REDIRECT target=Shop.Form)}
(:input text foo:) (:input submit:)

If the page does not exist pmwiki prompts to create it in the usual fashion.


2) The Shop.Order page is not created at all. Shop.Form was, so it's not 
a write permissions issue. The same redirect question as above too 
because Shop.Form would need to redirect to Shop.Order.


- How should permissions be set so that any visitor can create/modify 
only the order page?

$WikiShWriteList = array('Shop.Order')?

Btw, the order page would be visitor specific. Don't we need sessions 
for this? Should it be a session page URL like 
Shop.Order-3h7ft219IJH5656dddgyg? I don't know how pmwiki handles sessions.

> (I'm using the latest WikiSh and I'm not sure if this particular code relies
> on any recent changes -- if you want to run it let me know and I'll give you
> a copy of the most recent)
>   

I downloaded WikiSh a few hours ago, is that the latest? I'm running the 
latest pmwiki (...beta65).

Peter, again, Many Thanks this is a great start to a wiki order page,

Marcus






More information about the pmwiki-users mailing list