Jump to content

dardub

Members
  • Posts

    26
  • Joined

  • Last visited

    Never

Everything posted by dardub

  1. Check this out: http://alanstorm.com/magento_controller More and better information than I could give.
  2. So from your experience, out in the real world is an existing site not likely to be updated to a newer library until for some reason it becomes absolutely necessary? In which case the application would require being rebuilt if the newer changes are too drastic?
  3. I'm just starting to learn about zend framework. I was wondering about after you build an application in say zf 1.10. And a couple years later they come out with zf 2.0. How easy and what is the process to upgrade? Do people usually just build an application using one version of a framework and leave it? Is it a mess to use vendor branches in svn? Just from looking at my somewhat outdated book between versions 1.8 to 1.10 there definitely many calls to functions that need to be changed.
  4. Well I started working on Magento and then I realized how helpful it will be to learn zf first. I'm still just learning zf now. At least you're going in the right order which definitely helps. I didn't get a choice in what cart to work with, so I don't know if any are better. But magento although frustrating at times is set up to do a lot. I'm not 100% sure since I'm new to both, but there is heavy customization in Magento. So there will still be a learning curve, but you have a good head start!
  5. Yes, I figured creating a separate table for file paths was the best option. I was trying to make it simpler for the op, but I maybe was just reinforcing bad habits.
  6. Teddy, I just strarted reading this book: http://www.amazon.com/Object-Oriented-Thought-Process-3rd/dp/0672330164/ref=sr_1_1?ie=UTF8&s=books&qid=1272075133&sr=8-1 Its about object oriented design, and it tries to stay away from coding as much as possible, just to explain the theory behind OOP and MVC. I'm still a novice programmer, but I've recently started playing around with different frameworks. Looking at how everything is organized and implemented is very helpful. I just got this book today as well: http://www.amazon.com/Practical-Web-2-0-Applications-PHP/dp/1590599063/ref=sr_1_1?ie=UTF8&s=books&qid=1272075358&sr=1-1 I haven't read it yet, but it had some good reviews on amazon. It teaches you how to build php web applications. I guess most of the examples are using zend framework. But yeah, I think learning a framework that uses mvc would be the best way to go about it.
  7. I guess I a reason I was hesitant to use the windows server for svn is because I didn't set up either of the local servers. For one I am afraid of screwing something up on our domain server, and also I don't know how easily I'll be able to connect to the repo on the windows server from the linux testing server.
  8. First of all, it looks like in your database, you only have one field for one image. So either that field would contain a string of all 6 image paths, or you would create 6 fields for each row, or you could create another table just to store the image paths. If you will always have 6 or less files to upload. In your form you would have 6 inputs with different names instead of only user. So the form would have: <input type="file" name="image1" /> <input type="file" name="image2" /> //etc. If you're going to put all your file paths in one field, your php file would be: $filename .= $_FILES['image01']['name']; $filename .= $_FILES['image02']['name']; //etc. I guess it just depends on how you want to store your data in the db. I'm a novice too, so hopefully I didn't steer you in the wrong directions.
  9. @Roopert Sorry, I meant Visual SVN not Virtual SVN. That's definitely a confusing statement. Visual SVN is an svn server for windows if you're not aware. Yes, I don't see the point in stopping version control because you are working with other developers. That's one of the reasons I want to use svn, is to work with other developers. I initially wanted to put the repo on the testing server because it's local and behind a firewall, but I understand how putting something that valuable on a potentially unstable server can be hazardous.
  10. Thanks for the advice. I don't think we'll have a problem with accidentally working on the wrong copy. However, if more people start working on it, then yes it could get messy.
  11. The other local server we have is a windows domain server with a local and offsite backup. Would you recommend using the windows server with virtual svn server? Or putting svn server on our staging server?
  12. Let me know if I should start a new thread. I was working on other things, but I'm slowly working out what to do about svn today. So right now we have a remote production server and staging server. We will soon have a local linux testing server up and running. My thoughts were to have the svnserver and host the repository on the local testing server. I have some more specific questions now. Would there be a problem with developing on the working copy on the local testing server? I'm working with Magento, and it does not work too nicely with windows, from what I'm experiencing. And I'd rather not make us switch to linux on our desktop machines (partly because we use adobe cs). At the moment there are only two of us making modifications to the site. I suppose I'm still a little cloudy on some aspects. Is the following something that could work? 1. Testing is a working copy of the trunk in the www dir on the local testing server. 2. Manual testing is done and necessary changes are made. 3. Create a tag and name the folder accordingly (release-1.1.0 or whatever) 4. Checkout the current tag into the staging server public directory, import newest db. 5. Perform manual testing. 6. After testing has passed, use rsync to update production server, excluding .svn directories, cache, etc.. Anyone see a problem with having multiple working copies in the www testing directory. One working copy for each individual (2 of us ATM)? Sorry if my explanation doesn't make sense. I was thinking out loud when I wrote this, and was making changes along they way.
  13. dardub

    OOP Help

    Thanks for the info Nightslayer. The code made things a little more clear. I already changed everything to a 2d array yesterday since I just needed to pass the id and qty for each item. One question, I'm not sure the best way to set the id and qty for the motherboard for the code you showed: would i do something like: private $itemId; private $itemQty; public function setMobo($id, $qty){ $this->motherboard->itemId = $id; $this->motherboard->itemQty; = $qty; } Or is there a more general way?
  14. dardub

    OOP Help

    @ignace, lol, no I'm not serious. I was just using as an example as I mentioned. You're trying too hard to be a nerd.
  15. dardub

    OOP Help

    Yeah, as I thought about it more, I couldn't justify a reason to use it as an object. I'm sure I'll get my chance to create some new classes some day.
  16. I'm trying to get used to use objects in php, but my mind still thinks in arrays and relational databases. I'm looking for guidance in how this should be done. I'm doing this using magento, but I'm just having trouble with the basic php implementation. I have a products page that creates a bundle. Lets say for instance I'm creating a custom computer. The user can pick out a motherboard, memory, hd, etc. They can only pick one of each of these. The user can pick accessories which there can pick as many as they want. The items the user selected is then displayed on the bottom of the page for each item. Once they are done they can check out all the items. When the user selects a product I want to store the item id and qty into a session cookie. What I'm doing now is creating an object for each product category assigning the id and qty to the object and then saving to the session. If a user selects another product in the same category, it overwrites the session storing that object (which is what I want). The problem I see for the accessories, is I would need to define a product object for each individual accessory. This way of doing it doesn't make sense to me. I feel like I should be setting all this information into a products array and then saving the session. Am I just trying to force OOP when using an array would suffice?
  17. Thanks for your help Mchl. I think I understood about half of what you said. I'll have to start reading the book to get a good understanding of svn. From what I gather, the entire process is using the same svn server and repository? And I assume it's fine to have a local svn server? I just found out that we have a local linux server that never got finished setting up. I'll have to get that going. I'll probably have more questions after I finish the book. Thanks.
  18. I guess I can ask a more specific question. My first hope was there would be a book out there to get me going. I have been doing some research on the matter. The problem is this is my first job doing php programming and there's nobody at my work to ask questions like this to. There isn't a good testing environment here and there's no version control either. Right now our production and testing site are hosted remotely on linux servers. The files I work on are on a local windows server, then I upload the files remotely if I want to view the changes. Then the files are uploaded onto the productions server. Doesn't seem like a good system right? There is only one other person working on files doing front end stuff. I want to set up a local testing server where I work on the files and test the changes. This local testing server would have an svn server as well. Then I would upload the files to the staging area (former testing server). A final check of the site would be done there. Then we'd push to the production server? Hosting provider said he can use rsync to do this. Is this a proper method for website production? Is there anything else that I am missing. Should there be a separate svn repository for the staging and production server as well. And should all the svn repositories be served from the local testing server? BTW, The procedure I'm talking about is for an existing site. I will be working on a new site in the near future as well.
  19. Thanks for the tip, that's good to know. The couple basic php books I've read; I don't remember the mention of that difference between double and single quotes. Is it okay to put double quotes inside of single quotes since it's just a string?
  20. Sorry... I had several input boxes with the same name. Therefore it was only grabbing values from the last field named qty. I wasn't thinking about how forms work correctly. What I want is to have only one qty field submitted when I press the submit button next to it. I'm guessing I'll have to use javascript for that?
  21. Hmm.. is this a crazy request? Is there nothing good out there?
  22. just to check i used echo $_POST['qty'] and also tried print_r ($_POST) when I print the array, i get back ['qty'] => with no value i'm going through my code right now and cleaning it up, it's probably some dumb thing i left behind
  23. Well if nothing seems wrong with that. I must be doing something wrong elsewhere. I just wasn't sure if I as formatting that wrong.
  24. Yea thanks, I had tried that one already too.
  25. This should be an easy question, I just can't figure it out. If I have a text input such as: <?php echo " Qty 1: <input type='text' size='2' name='qty'></input>"; ?> and I enter in a number in the field, the value doesn't post to to $_POST['qty']. If I do: <?php echo " Qty 1: <input type='text' size='2' name='qty' value='3'></input>"; ?> the number 3 posts if i just simply do <input type="text" size="2" name="qty"></input> in plain html it works fine, whatever i type in posts to $_POST['qty'] what am I missing? how should i format this? I'm trying to put the form fields into a string variable, that's why I am doing it this way, if that makes sense?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.