Jump to content

cehlo

Members
  • Posts

    36
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cehlo's Achievements

Jr. Member

Jr. Member (3/6)

15

Reputation

  1. Indeed, that's look quite easy. I haven't seen it there. Thanks, keep up the great work ?
  2. @kongondo Firstly, great work. I am watching all about the development od padloper 2 from the start a in looked very promising. Finally, the time has come that I need to create new e-commerce site. How is it with implementation of additional payment gateways? Is there some abstract class for that, or what it be too difficult to implement solution on my own based on already implemented gateways - stripe, paypal?
  3. Ok, so according to your previous post variable $pizza->ingredient is page array so you must use foreach also for ingredients.
  4. If you are getting ID of ingredient possible workaround could be this: $ingredient = $pages->get($pizza->ingredient); Then use $ingredient as page, eg. $ingredient->title... Maybe check settings of your field in Pw if nothing is out of ordinary.
  5. Now it is a lot clearer. Yes you are right in both points. Either way from your first post it was not certain. Regarding variables you are right, but in your first post your first php input was using variables without giving them value. So $percent = $goalNum / $raisedNum; will give you everytime 0, becasue variables $goalNum and $raisedNum are empty. But I can see from your next post that you are giving them values so it was just misunderstanding. If count is another variable it is also without problems from your full code, consider my first post as irrelevant then. i Ok and what about your fields? Are they Integer or Text fields? Can you change them and avoid typecasting at all?
  6. Hello Spercy16, Firstly I don't think it is good practice (or possibility at all) to use dollar sign in fields name - raisedAmount$count - really bad practice to my opinion. Continue using camelCase style or add underscore - raisedAmountCount or raisedAmount_count. First error: In your first example - you are calling variables $goalNum and $raiseNum without declaring them at all. That is why these variables are empty. Second problem: raisedAmount$count and goalAmount$count are fields or pages? Get rid of dollar sign in field name and use direct aproach for calling fields in this scenario. $page->raisedAmountCount etc. (page->get documentation). Also do not typecast these variables in your code. If this field should contain only integer values than change field type in processwire to Integer. Really your main problem are fields you are calling raisedAmount$count. Is this the field name? Or is it child page with another field $count? Maybe give us more information about your field and page structure to tell you right way to call these fields. <? php $raised = $page->raisedAmountCount; //if these fields are integer type $goal = $page->goalAmountCount; $percent = $goal / $raised; // You will change this, because you are calling not existing vars ?> <progress value="<?php echo $percent; ?>" max="100"></progress> <!-- This should be working without any problems -->
  7. Hmm, maybe try to explain better. Formbuilder is not used for creating pages, it is used for creating forms and saving input in meaningful manner to PW. You can just insert created form with formbuilder to any template on frontend, it is not connected to creating pages and templates as far as I know.
  8. Hi there, first the answer depends on that if your array "children" is PageArray. If yes I believe if you want currently viewed page you must check if child->id is simalar like page->id not parent->id. Secondly if you want to check if checkbox is checked the right way will be: $child->checkbox_field == 1 Also I think you know this but else if must be put before else statement :D. Lastly maybe consider using custom menu builder for this. Menu Builder. In addition this checking can be done before building actual markup for menu. So you can consider this solution an then you won't need else if. $menuPages = $pages->find('menu_item=1'); //and add additional selectors for template etc., also you can use selector like this for method children() Cheers.
  9. It is very strange, when I used bardump in tracy console during this error with same line: bd($this->user->language->isDefault()) no error in tracy. I am just rubbing my head on this for like 4 hours and can't find no error or the cause of this. I even try fresh install of pw, imported database and site folder with no help. Then deleted ready file, all modules files still problem persists... Adding also some more error description from debugModelPanel. Thanks for help in advance.
  10. Maybe little bit old, but again same error. Now I can't save or edit user profile for another user than superuser. I am not currently changing by any means edit profile module nor hooking it. And this is popping out. Maybe at least some advice how to track error more precisely, because now is only forwarding me to LoaderCache and there is no problem. Thank you very much.
  11. Hi there, If I understand correctly you don't want to have selected none page? If that is the case, just drop down pages for select, find that one which is selected and choose "unselect".
  12. Hi guys, I am just thinking about purchasing Form Builder. First, I want to ask if it is possible to generate forms also on backend custom pages, because in description of module is written only about generation forms in frontend? You would ask why would I want to use forms in backend. There are some events, which I want to create online registration for - different for members - they will log in and It will automatically load information from their accounts to forms, on the other hand there will be different form for users which do not have accounts on frontend. Thank you for your assistance. Cheers Cehlo
  13. Hi guys, just one shor question maybe just for my insight. When we are using PageArray like array of pages, it is possible to have same page in there twice? Specific problem - I had created method to generate pedigree of dog with 30 ancestors. It is PageArray and order of pages / dogs is important here to generate fronted output. So, You know dogs are not very monogamic and inside one pedigree it is possible that one male ancestor is there multiple times. So problem is that during generation of this PageArray, when there is second occurence of same page / ancestor, first will disapper. So my question is - is not possible to have same page multiple times in Page Array or should I look for some errors in my code (which I did not find for now) ? <?php // It is not same code, but this is all according to manipulation with pageArray I am using when I am creating PageArray $pedigree = new PageArray(); $pedigree->add($ancestor_page); ?> Thank you for your answers. Cheers B.
×
×
  • Create New...