Jump to content

freestone

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by freestone

  1. OK.... going to read the tree explanation 20 times and revisit Antti's Shop module code with all this great new info you guys have shared. If I can expand on Antti's order creations process to add the extra fields I need to capture and instead associate an order to an authenticated user I think I can start to do some work. Oh how I don't want to bail and go back to Drupal. Is this the module I want to authenticate users and let them set up their own profile ? http://modules.processwire.com/modules/frontend-user-profile/ I will need to associate my orders to logged in user and allow them to see past order they have placed..... I dont want them to have to put all their info in each time they order.
  2. Thanks a lot guys. I stared at the API cheat sheet a lot in the last few days and never noticed that there were +'s at the bottom of many of them....LOL...so I never saw save. ...Duh. That is what happens when you are at the edge of your skill set. The brain just start blocking things. OK so pages are rows and templates are tables .... . I can wrap my head around that..... the XML tree thinking might take some time to get oriented in my head.... I am still inclined to use the template as tables with my own foreign keys since I now understand the page CRUD.....LOL Another questions in looking at what I have to do. I see there is a date time field. How can I pop out a calendar to pick the date? Many noob thanks, JW
  3. Thank again diogo...... it is a matter of really old dog, newer trick....lol I follow the logic but it goes through an example where all the data is created in the admin. That is obviously not real life. In looking at the APIs are retrieval oriented. so for CRUD the api's handle the R but you have to create (insert), update and delete using queries you build ? The path I was headed down was to create the fields I need, put them into template that related to what I think of as tables complete with IDs and forgien keys and then assign pages so I could retrieve the data. Relatively ease to then loop through the retrieved templates......but for me the missing part is insert, update and delete. If I have to write all those queries then I might as well just write the entire app in php...... No ?
  4. So I did a lot of reading and testing and reading and looking at some profiles and module code and I still having trouble wrapping my head around using the field/template/page structure to simply implement some business process against standard relation tables in the MYSQL database. Of course the way I think is order table (with all its columns), Order item table (with all its columns), product table (and all its columns) ....these are all related with foreign keys of course. So in php I would write some code to run joined queries get the result and mark it up and render it. So how in the heck do you make the leap to organize the wire components of field/template/page in such a way were you can simply run queries across multiple tables. I assume the fact that I even ask this means I just don't get it ? I don't see any profiles that have this sort of logic implemented. The profiles I see are very simply by comparison so no examples to really follow. Can I simply build the tables I want and use the API's to I/O and render them? Perhaps this defeats the entire reason for using PW ? Or is there a forum post I have missed that describes how to think of the PW construct for a standard relational data base with its associate query's?
  5. Thanks again Diogo I will take a look. The only menu code I have put in place so far is the code that came with the longer tutorial. TU_topnav.inc. I am back at this and also just notice that apeisa does clearly say in step #4 that you can render an add to cart button using this code echo $modules->get("ShoppingCart")->renderAddToCart(); ......I was so focused on my confusion of #2 and #3 I missed that. I am now going to see if I can render a Cart button and get into the cart. Then I will start looking at the code. Thanks to all for the help so far.
  6. Well I was really there I just had some typos and also a very strange thing happening and still don't quite understand it. apeisa I did have the price in my template.....well I typed it as sc_product_price as you can see from my post and I changed it to sc_price (duh!) and it worked. My one suggestion for newbies would be to change #2 to say something like render the sc_price field in your product page template and template file. I think of a class in the OO sense of the word? Also it would be very helpful to show the echo $modules->get("ShoppingCart")->renderAddToCart(); code since a product page without an add to cart button is not of much use. For # 2 you could add that you need to create a few product by creating a product page for each product instance....well at least that is all I know how to do at this point....how else would you create a product ? That's my input on the instructions. The other thing that is really strange is the reason I could not save the page with data in it and the page had a line through it was the sc_product_id field I created. I found that I could store and instance of the page with all the fields filled in but for the sc_product_id . I could not figure out why so I deleted that field and recreated it and still I could not store any data in it. I then removed if from the template again and deleted it again and this time called it sc_id and it worked fine. So I am very puzzled as to why sc_product_id would not hold any data. When I was trying to put data in it on the product page I got unknown page at the top in red. Very strange. That name perhaps is a conflict ? I would pick a name that would simply not work...LOL I now have a product page showing with an add to cart button so now I can look at the other get shopping cart features to checkout. So is there an easy way to include a page in a search but not in the Nav Bar....they seem tied together ? thanks for the help. I am sure I will be back with more questions once I return from a bit of time off.
  7. Diogo.....Yes Joss summed up where I am pretty damn good. It is hard to get a page not to be ......well ....a page in your head. It is hard to take instructions like ....just take your products...when there are no product...and make progress if you are not already on level 5. I have the concept and think....man this is elegant....and as soon as I think of how to use it my mind goes to the thing I am actually trying to do an I am stumped. Such is the learning curve. I must say I have done a lot with drupal and for all its baggage it has its place. I just need to take my skills to the next level with PHP and I am concerned that with Drupal I have to climb the Drupal hook ladder and also the php ladder. With PW I have to climb the php ladder and general concept and construction and the api but I am still not ready to toss in the towel and go the certain Druapl route only because I think there is more long term benefit at the top of the PW ladder.....but yes I am still on the fence and will soon have to make a decision. Hoping someone will put me back on the ladder as I have fallen off . I subscribe to a video learning for Drupal modules...Build-a-Module and the guy goes into gory detail on all the simple stuff and the hard stuff he just wises by. This tells me he does not really understand what he is teaching or his audience. Here there for me seems to be a gap between building a fluff and buff site (easy in PW) vs a true business process site. I have a lot of e-commerce experience and I am a re seller of pinnacle cart and have done some open cart and xcart but luckily I don't need all those features on this project. I need to interview a customer and build an order and checkout. So again hoping someone can put me back in the saddle.
  8. OK now my head is spinning....LOL I have been through the planet tutorial and the longer tutorial found here http://wiki.processwire.com/index.php/Basic_Website_Tutorial I understand the concept of field, template, template file (and I get the difference) and pages ....still having a bit of a time thinking in this way but I see the elegance in moments of clarity. My next step was to install a few modules which I did. Then I implemented HTML Kickstart and all looked good with my example on tablet, phone and desktop so I got it to be responsive. Next I installed Shop model and was trying to implement a simple product page and check out and also use it as a bit of a spring board to understanding the APIs. Once I started looking at the install instructions for the Shop module since the core of what I need to do is sell a service and get a customer to pay....this is when the spinning started. When looking at the Shop module install instructions I actually understand the later steps better than number #2 and #3 which have me stumped. It seems in the later steps Apeisa is showing you his hook for rendering the cart and checkout process but you have to have products and add to cart first. The second and third step of the instructions read.. 2. Add sc_price class to your product template (can be multiple templates) An example would go a long way. I'm declaring a php class in a product template I create? 3. Edit few of your products and give them price - The module did not create any products or even a product template so I went to create one ....but..... I found a post by Dave (I think) about the add to cart button which said echo $modules->get("ShoppingCart")->renderAddToCart(); So I proceeded to create some other fields since the only ones I saw was price and QTY. I created ID and Desc and created a template like this <?php include("./TUT_header.inc"); echo $page->sc_product_id; echo $page->sc_product_desc; echo $page->sc_product_qty; echo $page->sc_product_price; echo $modules->get("ShoppingCart")->renderAddToCart(); include("./TUT_footer.inc"); Then I created a page but the page error-ed and had a line through it on the page list. I then also noticed that in the fields there are some fields it was not showing when I changed the filter to show the "Built-In" fields. and in fact there was a field that says it is type=page which blows my simple mind a bit. These fields are not however available for a template so I am guessing if I start looking at the code they are using in the checkout process and there are api's that let you create these fields. I am headed out of town for 4 days but if anyone can give some simple steps to creating a product with an add to cart button perhaps I can keep going from there. The other thing that is confusing to me is that I was headed down a path to create a template for a product (which is kind of like a DB table but also has some html to render it ....Right?) but in order to create say ....3 products I then have to create 3 pages ? That does not make any sense to me. Guess I expected the Shop module to handle product management as well as order management. I realize this is more flexible in that I can define what the attributes ( columns/fields what ever you want to call them) of a product are instead of the module dictating that but I feel like I was swimming along in the shallow end pretty good and then went straight over my head. It there another tutorial or example project that would help me understand the "class" reference in step #2 and that would help me start to understand how to start using the API's to do more than present some info pages? I know I could build a nice info site right now that would be so much quicker than anything I built in Drupal but need to take the next step in understanding and did not really see a next step tutorial in the wiki. I started to look at the API's but I think that will only be helpful once the log jam in my head is broken. Thanks for being patient with a newbie.
  9. Thanks to you both. I am continuing down the PW path for now. Still wrapping my head around template vs page. Of course I keep wanting to liken some things to Drupal ...like templates are like much more flexible blocks. It seems my biggest challenge will be adding on to the Shop module the way I need to so after I finish some of the suggested tutorials I will get that module installed and see if I can understand how tweak it to what I need to do. Already I see that I can use the html kickstart to get a responsive theme going as a starting point and could already build a site that was an info site. Is it easy to expose certain parts of the Admin pages to users that need to maintain site content but limit them to what you want them to see the same as roles in Drupal ? In Drupal I would simply use a menu module and plug in the parts I wanted to expose to that menu system and give the proper privileges. I will post my questions as I go and sure appropriate the help. Hopefully the other side of this project I can contribute something to the party. It sure does feel light and airy compared to drupal.
  10. Of course it is already clear to me which could be more easily maintained and added to...... PW!
  11. I am starting a new project and ran across PW on the Bitnami list. I spent the time to install PW on my WAMP stack and take a look. I went through the Planet Tutorial and implemented HTML Jump start and the grids are working. I am amazed at how quickly I have ramped up to this point. I have a lot of Drupal module experience and can tweak Drupal modules. I have a lot of programming experience but little php. I am not worried about learning the needed PHP skill. Below is a list of the things I need to do for this site. My question is …..Can I learn the needed skills to produce this site faster in PW or Drupal. Drupal will get me 70% there will modules. PW I think more like 50% but after only working with PW a short period of time it seems I might be the other 50% done in PW faster than the 30% in Drupal ? I don’t know either API set (drupal hooks) but I started down the Drupal path and was discouraged quickly as it is learning a new language that is applicable only to Drupal and most likely makes sense after you are ramped up but right now look ill thought out. Drupal is great if you can get 95% there with modules. This project is more like 60% there with Drupal modules but I sure dislike the BLOAT and the resulting lack of speed. For this site I need. 1. Has to be tablet and phone responsive. 2. Easy two level nav bar (menu) 3. Has to manage orders as it is a service oriented e-commerce site. Shop for PW looks like 60% of what I need. 4. Need to easily be able to ask the users a series of questions and build an “order” based on the answers. Some of the questions will result in form changes that would ask yet different questions. So I need to look at some good code for DB interaction. Perhaps looking closer at Shop will ramp me up there since the DB interaction I need is all order related. 5. I need to interact with a tool that will calculate mileage from address A to Address B. 6. I need authorize.net payment gateway. 7. Standard social media like/follow 8. Contact Form with email to multiple email addresses. 9. I need to expose the Orders and other order related info to admin users that should only see the order management (none of the standard PW admin). This is pretty easily done in permissions in Drupal and it looks to be the case in PW also but I have not looked close enough yet. That is it…version 1 does not need sliders or anything flashy….maybe later. So if anyone out there knows the Drupal bloat and also knows PW and can venture an opinion which tool I can use to create this site faster I am all ears. Also any specific tutorials or other ramp up articles to read to understand working with MySQL would be great. Thanks Much JW
×
×
  • Create New...