-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
Looks like you have no body field? You can set the default search fields in the admin search module settings. Modules -> Core -> Page Search
-
If using init.php it can get executed multiple times if you use render() to render something in your templates.
-
Take care what you put in the _init.php. it can get executed multiple time if you use to render() pages inside the templates. Every render triggers slay what you have in init. Just good to know.
-
Maybe its in demo mode.. look in site/config.php
-
BASIL WAS ALSO THERE.
-
AS far as documentation goes. I'm not sure, certainly it's spare, what the future of this module is and since it's wrapped up quickly by apeisa for simple own project, there isn't much support or development going. Although I find the readme and looking at the example payment modules enough to get it up quickly. I know this doesn't apply to all. Non experienced developers may struggle. But usually I find people scare away from modules (when they shouldn't) and think there's a lot of complexity that isn't there really. It's so simple as it doesn't requires much and works with the same API as much as you would with pages and in templates. A Payment module here is the module run when you get to the /checkout/payment/ step, it either just saves the order and shows a message or redirects, or it builds a form you need for your payment provider etc . Look at the simple invoice example. https://github.com/apeisa/Shop-for-ProcessWire/blob/master/PaymentInvoice.module processPayment() is the method called once you reach that point in the checkout. This can be anything that is required to do the payment. https://github.com/apeisa/Shop-for-ProcessWire/blob/master/PaymentExample.module
-
Strange I've never experienced a 404 there the last 4-5 setups with this module. It's done using url segments /checkout/confirmation/, checkout is a real page and confirmation the segment. Checkout modules doesn't handle a 404 so there must be something else in your case. does the sc-checkout template really have url segments enabled? It should cause the module installs the template and sets that option. If that's set I don't know. Maybe cause you run it not from the root in a subfolder.
-
Welcome! You just include(/path/to/file.php) http://php.net/manual/de/function.include.php You could also use a php switch() instead of if else switch($page->id){ case 1001: echo "..."; break; case 1002: include(...); break; case 1004: echo someFunction($page); // maybe a function default: echo ".."; } About the approach I'm not sure and don't see the whole picture, but experiment with different ones. There's no general "this is the best". Whatever makes sense and works for you. I think outputting content by id might be ok in one case, but maybe not so convenient regarding reading/maintenance and code compatibility. I usually try to avoid it. There's so many ways to build templates and output your code in templates, and it goes far beyond this question. And there's as many different opinions on what is good and what not. But some principals may apply always. Usually I find it more convenient to use different templates for different pages as much as possible.
-
There's no markup module that output content themself, you always need to echo it. This makes it a lot more flexible as you only get a string back and can do things with it, or use it in a own function to generate markup and send it along. For me it's bad practice/design when a markup generation method uses echo to output it directly. Not sure what you mean. I think confirmation should be the details you entered read only, then you go on with the next step (this is where payment module is run). I'm not sure what PayPal module does, but the payment module does "something" and when done showing some thank you or redirect to some other page.
-
Where is the echo?
-
Can you show your code? Do you echo ... ?
-
Well you just set the fields from the other page, and the $page will still be the same page object just with new content (on runtime). $p = $pages->get("/somepage/"); foreach($p->fields as $f){ $page->$f = $p->$f; }
-
RT @teppokoivula: ProcessWire weekly #9 is out right now! http://t.co/XXZewCSGlg #processwire #cms
-
I don't see what this should be good for. If you set the current page to be another instead, then just get the other page. $page = $pages->get("/someotherpage/"); Doing this at start of output will change current page to the other, so it's indentical and all will render as it would be the other page just having the url of the previous.
-
Made a little update to the ImageManager.module. Haven't recognized something before when testing. - fixed issue with pagination not working in PW 2.4 when using has_parent=/path/, turned out that has_parent=1009 with ID works. Looks like this has been fixed in latest dev.
-
Hello guys Just committed a larger update to 0.1.0: lots of cleanup and major changes, but still backwards compatible some fixes to tag parser as there were issues with multi language major rewrite of the image results table to get rid of bundled jQueryDataTable and Fancybox (saves a lot of files and resources that where not necessary) now uses PW MarkupAdminDataTable with custom ajax overall nicer and solider UI integration into PW new admin theme other small improvements and fixes To update, just replace the module folder with the new one. There's a lot of files deleted, so don't just merge. So a lot of changes behind the scenes you won't notice much, but also UI wise it's much nicer now. It should works nice and I think requires PW 2.4 now. Not tested in 2.3, but mainly I think the use of JqueryMagnicfic Lightbox script (in core 2.4) now for image preview zoom. Otherwise it should work the same. I removed alpha status, whatever that means. After all it's not meant to be the solution to all problems people might have with PW's media management. It's a nice little helper tool to upload images and create pages from them. In the end it's all saved in a form you could even uninstall ImagesManager and plug your own to handle the data. It can also be seen as a resource. I'm not sure I'll add it to the modules directory.
-
Well the cool kids use remote control, Airplane bahh... Glad you found it. I have no idea why.
-
APC php cache? Is there anything on the title field? Textformatter? It's hard without sitting in front.
-
I'm not sure. Can you hand a copy? Cache?
-
Yes those two pages have same template. It doesn't matter what template. I've never used the save and test. But I think you would see the current admin page title if anything at all.
-
I tested something like this in latest dev and 2.4 installation, works fine. I can't see any text not outputting. Default site. Added hanna code formatter to body field. In /templates/ page in the body I place a hanna code inside text [[model-name]] and output that text on the About page. Hanna code <?php echo wire("page")->title; In template basic-page.php echo $pages->get("/templates/")->body; The hanna tag gets replaced with the page title and the surrounding text is still there.
-
I have hard time following what code is where and what doesn't work.
-
Sorry can't really follow what you're doing. Mostly confused why you'd need hanna code at all just for a page title?