Jump to content
Larry Ullman's Book Forums


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts 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.



  2. I found the best solution to this problem with CGridView




    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. 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!

  4. 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.

  5. 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.

  6. 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.

  7. 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.




    The old docs for Bootstrap V2.3.2 are available at:




    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.

  8. 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.

  9. 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.





    • Upvote 1
  10. 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. :rolleyes: 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!

  11. 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:




    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.

  12. 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.




    The majority of websites are using this now as time is money in business.

  13. 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.

    • Upvote 1
  14. 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).

    • Upvote 1
  15. 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...