-
Posts
6,808 -
Joined
-
Last visited
-
Days Won
159
Everything posted by Soma
-
Use "shift" + greenbutton to maximize window.
-
Uff, a though one without having this code and exact setup for testing out the code and trace. There's a lot that can go wrong when using cookies for storing settings while using server side... I mean it can get complicated and tricky. Looking at the code I don't really see obvious flaw, but that's from looking.
-
Problem with linking to a page in a different language
Soma replied to julbr's topic in Multi-Language Support
How are those links created? But then the links should be /es/nosotros-concepto/ and /en/about-us-concept/ no? I have no idea what you are doing, and why the links are like this. A PW url always looks like this format /pagename/childname/ When LanguageSupportPageNames is installed you can define the /en/ /es/ names on the home page settings. After that you get correct urls when in one of the languages or you can get a specific alternative language url with $page->localUrl($language).- 2 replies
-
- language
- multi-language
-
(and 2 more)
Tagged with:
-
RT @processwire: Introducing Multiplier– Turns other ProcessWire Fieldtypes into multi-value types! Watch the screencast here: https://t.co…
-
Great work on the narration! Just for the record: Multiplier doesn't support language text fields.
-
Questions using Apeisa's shopping cart for selling festival tickets
Soma replied to joe_ma's topic in Getting Started
Just want to mention that the shop module isn't a very complete solution and for anything special you will need to get your hands dirty. You won't get it working the way you need without modifying every shop module and make it your own completely. You could take it as a kickstart to your own shop. Just for clarification, using the repeater support currently in the shop module is meant for variations. Means the page the repeater is on is the product. If using this the saved item will have this format. PageTitle: RepeaterTitle There's no support for other fields than the title! But one could use the title field of a repeater to save more than just a title. Maybe a "title, date, location" that constructed on page save with hooks, or on runtime modifying the $page->title of a repeater. Note that also every repeater is a page in the back and this makes it easy for the shop to take a variation as a page with it's own ID. Repeaters can have they're own price field of not it will take the page price field. So as you might found out you can loop the repeater out and create a add to cart form for each. Since it is a repeater page, shop module recognizes it as a own product/variation. Currently you seem to use this system for events that require multiple tickets, so - EventPage - repeater: EventTickets - repeater: Event2Tickets So far so good, but it seems you even need variations for the price for each "ticket", but you already have used variations for the tickets for the event. This will get tricky as there's no support for multiple prices per item. So no way to get further with this approach unless you completely adapt the shop system. What you could try also is to add each ticket as a subpage instead of in the repeater of the event page. Then you can use repeaters to on those subpage's still to create variations for one ticket, member and nonmember. Each having their price. - EventPage - EventTicket1 (childpage) - repeater: member (item to add to cart) - repeater: nonmember - EventTicket2 (childpage) - repeater: member - repeater: nonmember This could work out better and you still can construct your event page just using childpages and their repeaters to have options (maybe as a select) Then, you "only" have to adapt cart, checkout and management module to have Productitle: repeatertitle do what you need. -
Using strings for translation in templates __("Some Text") I have french translation which often contains a single quote ' like in "d'or". They will get converted to htmlentities. so ' becomes ' I can convert them back with something like html_entity_decode(__("Some Text"), ENT_QUOTES, "UTF-8") But I don't think this is practicable solution to do all over the code. I don't think it's really something solvable in the translation system? It seems ' single quote is not the typographic correct ones anyway and should be written using ´ that seems to not get converted.
-
Questions using Apeisa's shopping cart for selling festival tickets
Soma replied to joe_ma's topic in Getting Started
All methods in PW usually return a string, it doesn't print anything by itself. echo $modules->get("ShoppingCart")->renderCart() ; -
Regarding languages for these modules, I don't see language alternative fields (ie: text, text_fr, text_it) being avery usable option. Consider having 5 text inputs, I have to create one field for each language and put them all one after another, that will give me 3x5 inputs scattered over the page editor. For site editors this doesn't feel quite intuitive and is mixing approaches. So creating 5 textfields is still the best way to go and those profields aren't of much usage except for multiple inputs not needing languages like phone numbers, which is very seldom. EDIT: Regardless, I also wanted to say thanks for those amazing nice new tools! (just wish that "restriction" regarding languages wasn't there).
-
RT @processwire: ProcessWire ProFields: Watch this screencast for the 1st ProField called Textareas – https://t.co/VS11gvx25w
-
Sounds very cool. Thanks owzim , ill take a look when I get time.
-
I have also created a helper some time ago specific for InputfieldTinyMCE to strip non breaking spaces in text on saving. https://gist.github.com/somatonic/10330802
-
Would you choose a premade cake over a selfmade cake?
-
Render hook with a render inside results in endless recursion. You can avoid it by setting a property to the page rendered already and check for it in the start of the hook, and if this property is true, skip it. if($p->skipRender) return; ... $p->skipRender = true; $p->render(); ...
-
Looks like it's not about session. Line 2? There's nothing. Make sure PW is installed and there's all files and that they're not corrupted or missing. Sometimes it happens when upload to a server.
- 8 replies
-
- session variables
- non-object
-
(and 2 more)
Tagged with:
-
Thanks for mention it owzim, coincidently I just looked at that the day before you, and also seen that some lines are out of sync. I was thinking if there's a way to automate it or make it easier to update. Currently I just do it manually scanning with SublimeText and take the result list to convert it to html. I'm just not sure what the easiest or best method could be. If anyone got a good idea or knows how, please share. Two versions, one for stable and one latest dev would be cool. For myself I'm not really using it the sheet, as I use SublimeText to quick find classes and symbols to quickly get an overview of the ___ methods. So a matter of a few seconds to look them up.
-
And the code around it? Is $session existent in scope? Try wire("session")->$cartActive instead if in a function.
- 8 replies
-
- session variables
- non-object
-
(and 2 more)
Tagged with:
-
RT @apeisa: Celebration of commit number 1000 for @processwire and great new feature (subselectors): https://t.co/uKX260zCqF
-
It doesn't matter if $input->post or $_POST. I'm not sure I understand what you're trying to do, but inside php templates POST and GET vars works fine. PW uses it, I use it, everybody uses it. As I said, you need to post to a PW url with a trailing slash, or it will get redirected and lose the POST.
- 5 replies
-
- processwire
- post
-
(and 1 more)
Tagged with:
-
You're missing the slash at the end of url.
- 5 replies
-
- 1
-
-
- processwire
- post
-
(and 1 more)
Tagged with:
-
Displaying the Title when using Repeaters and Page Reference Fields
Soma replied to cstevensjr's topic in General Support
Those fields are page fields with multiple pages you select. Thus the field returns a PageArray. So you simply foreach through them and echo out something from those selected pages. $page->sd_status <- PageArray! foreach($page->sd_status as $status){ echo $status->title; } -
Like the topmenu? https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/AdminTheme/AdminThemeDefault/AdminThemeDefaultHelpers.php#L269
-
It does only work with a specified id radio=1002
-
Or if($user->name == "guest") ...