Jump to content
Larry Ullman's Book Forums

Edward

Members
  • Posts

    1115
  • Joined

  • Last visited

  • Days Won

    27

Everything posted by Edward

  1. Well just write a Yii or standard ajax function in the afterAjaxUpdate method to run a query on the current wish list/ watch list database then once the value is returned update the value on the page. Its as simple as that. You can add the ajax method to which ever model is most relevant to your wish list or watch list. This page may be useful it has some info on how to edit the afterAjaxUpdate method without directly writing into the framework files. http://www.yiiframework.com/forum/index.php/topic/23116-hide-a-column-in-cgridview/
  2. I found the best solution to this problem with CGridView http://www.yiiframework.com/doc/api/1.1/CGridView#afterAjaxUpdate-detail afterAjaxUpdate property public string $afterAjaxUpdate; a javascript function that will be invoked after a successful AJAX response is received. The function signature is function(id, data) where 'id' refers to the ID of the grid view, 'data' the received ajax response data. If you don't like writing raw javascript just use jquery for now and then if you site starts getting busy and slow change it to raw js or work on raw queries rather than using active record. I apoligize for all my posts i had been updating at times as of when i found new data, new to CGridView too. It is awesome but it does require quite a bit of customization. The good point with this reuseable code is once we have it figured out for now situation its easy to adapt css or customizations for another situation rather quickly. Now i am starting to understand why people love Yii.
  3. Also i found a Yii Booster extension: TbTotalSumColumn http://yiibooster.clevertech.biz/extended-grid.html#extendedfilter
  4. Okay i found a solution for what you want to do but you will need to write your own ajax request. Here is a link to a page on the YiiFramework forum for the same problem. http://www.yiiframework.com/forum/index.php/topic/12564-cgridview-shopping-cart/
  5. Im just about to start reading the cGridView and implementing it today, i have a similar situation to yours coming up Jonathon.
  6. Sorry Jonathon, if i had worked with cGridView I would of given you a hand but ive only work with cListView so far. You seem to be further ahead on your project than I am.
  7. Edward

    Bootstrap 3

    I am mix of Scottish and Norwegian i was born in Scotland but moved to Cambridge, UK at about 6 years old. I moved over to Asia about 10 years ago. I kind of figured you were from UK and not American from the way you wrote. Okay that is all really I wanted to ask you!
  8. Edward

    Bootstrap 3

    Did you see you see my question Jonathon?
  9. Edward

    Bootstrap 3

    Cool, well i hope we can get our websites done to a standard to go online as soon as possible, i guess all the fun for us will start then. I try to code everyday but I find myself getting bored with it and need days off to get my motivation back. Btw are you located in UK? I am from Cambridge, UK.
  10. Edward

    Bootstrap 3

    Yeah they do look good there, but there is a background color also to help them as apposed to white. Do you think those using flat buttons will make your web site more popular? Right now have coded too much to go back and change everything. Jonathon, when do you plan on finishing your website? I am trying to get most of mine done by the end of the year, i am getting much faster in Yii now, pages are going up by every couple of days now. I loved the ease of use of CListView, it's extremely useful. (Just another quick note, i just swapped the Bootstrap 2 css and js files with Bootstrap 3 files. My site looked much better with Bootstrap 2, that's from my desktop). I was thinking about this a little more and thought if you had 3d glass(transparent) computer screens css representation would be good. But since our screens are basically 2D, we require bevelling to help add depth to our web pages. On the account of mobile devices flat is fine as they are small already and we just need details to unable us to operate them. So CSS style really applies to the size of the display and whether it is 2D or 3D.
  11. Edward

    Bootstrap 3

    Oh, i thought things were flat enough already, why make them more flat, we are being robotized. Well i guess when there is one trend there is room for the opposite as well.
  12. Edward

    Bootstrap 3

    I was wondering the last couple of days why the bootstrap pages wouldn't load on github, now i see they have released a new Bootstrap 3. http://getbootstrap.com/ The old docs for Bootstrap V2.3.2 are available at: http://getbootstrap.com/2.3.2/ From what i see so far i prefer the older version, i hope those buttons they have a beta, they are terribly ugly. Seriously i could make these buttons with my eyes closed http://getbootstrap.com/css/#buttons.
  13. Enabling display errors will only show PHP errors, if want to display which form attributes were not completed you will need to write your own validation code for them.
  14. If you were going to do this you would be better of having process_post.php handle the mailto(), you would be able to obtain the member ID in that script from $_SESSION['member_id']. The use the member_id to fetch their username via a simple mysql query and add it to the mailto() function parameter. Otherwise if you don't do it this way and add the mailto() at the bottom of the form script you will find yourself getting emailed everytime someone loads up this form page.
  15. Glad you managed to get it worked out. The cute boxes with colored text is a code box, you can add one to your post by clicking on the "<>" icon just below the smiley face icon. Yes you will need to get some data into the database as some errors may be thrown if its trying to fetch something that is not there, that's unless you check for null values etc.
  16. I think this error is actually not in relation to PEAR, some of us had this problem before including "ME" and after rechecking the forums i realize it is to do with the base constant settings in your config.inc.php script. I think it would be a good idea to take a look at these posts below they may help you otherwise let us know your base constants so we can help you correct them. http://www.larryullman.com/forums/index.php?/topic/967-define-constants-for-site-chpt-3-pg-58/?hl=%2Bfatal+%2Berror%3A+%2Brequire%28%29 http://www.larryullman.com/forums/index.php?/topic/1663-connection-errors/?hl=%2Bfatal+%2Berror%3A+%2Brequire%28%29
  17. Yeah it can get to be some complicated stuff but like i said for now i will work with the server time, i may add the time zones when i can get someone yes just someone on the site, lol. Some days i find i make no progress with coding, brain is kind of clustered just thinking about all this stuff, but as from today i am on the roll once again. Ah one last thought we should never forget Larry he is like the biblical writer of computer books, if it were not for him, we may not be able to get this far. Thanks Larry, i flick through your books every day!
  18. Wonderful, we are all safe now!
  19. I heard there was a IPB security issue from the Yii Framework a couple of days ago noting their website was defaced by a security leak on IPB. Was there a patch provided to fix this problem?
  20. There is no edit_page.php in the download scripts, there is only an add_page.php. There is also no mention in the book of edit_page.page, so are you mistaken or i am mistaken?
  21. If you are using F12 on Dreamweaver you will need to setup a testing server to map the site to the browser. Otherwise you could just run the site webpage directly from the browser by typing in the following: localhost/_LUecommerce1test/html/index.php You need to check that the mysql.inc.php file is in the correct location. It may be better just to move the file into the same directly just to get it working, you could move the mysql.inc.php on the server when you need to make that information more secure. So for now you can move the mysql.inc.php file into _LUecommerce1test/html/ and just change the require statement to require(/C:/xampp/htdocs/_LUecommerce1test/html/mysql.inc.php). Or if you wished to make things simpler just remove the html folder and put all the contents in _Luecommerce1test.
  22. You can also use the JQuery javascript framework to aid your solution, using JQuery provides a faster way to get the same result as using core javascript. The advantage of JQuery is it provides a cross browser solution that works on all browsers, this can save you the time of hacking away with your regular javascript. However you will need basic knowledge of javascript in order to use JQuery successfully. http://jquery.com/ The majority of websites are using this now as time is money in business.
  23. It would be fine to let a customer know his order number that way its easy for you to reference. But the customer doesn't need to know his account number which would be the primary key, that could cause security concerns. The customer and you can reference his account just by refering to his email which would be unique. Just think of eBay, you can't go and add someone's ID to a url to bring up their profile page, you may be able to use their username to do it but eBay and other sites i have noticed like to hide the actual ID's. Ive seen in the past some security breaches on software where people knew that the Admin id was 0 and then they would use that to their hacking advantage.
  24. You could connect the "Add to Cart" button to an ajax function so when it was clicked it added the item to your shopping cart table in the table that way you would still stay on the product page. But anyway if this solution you are going to make is working with Sessions only the customer would at least need to log into the site every time they needed to purchase something right otherwise a cookie will definitely be required? (You need either an customer account on your site or a cookie stored locally on the customers computer otherwise reference to this customer and order would be lost).
  25. Yes, i figured that this may be useful for someone else so i tried to make the helped solution as detailed as possible. Actually after futher investigation of time zones today i will be leaving them out for now and possibly build them in later when the website is fairly active. As long as relevant database attributes are timestamps you can really do anything you please later on. Again thanks for your help.
×
×
  • Create New...