Jump to content
Stef's Coding Community

jstern

Member
  • Content Count

    93
  • Joined

  • Last visited

Posts posted by jstern

  1. Arrays


    If it were a personal site i was working on, maybe hiding the error would be acceptable. I am working full time for a company at the moment so Im sure i should be burying my bad code :P

     

    I've got it sorted out, I actually changed the logic completely so I didnt have to start pulling and editing out of arrays.

     

    Thanks!


  2. When you say Germany - I think Rammstien right away. One of my all time fav bands. Not sure if I can rock them while coding to well, but definitely have them loaded up on my iphone for my workouts. Couple other German bands that are worth a listen are Eisbrecher or Oomph. ( or even MegaHerz, but i only enjoy 1 or 2 of their tracks)

     

    Led Zep is probably tied with The Doors as my all time fav though. Ive gone through a Beattles phase recently, and I'm thinking I'm going through a Rush phase now lol.


  3. Ive never been a huge fan of the band rush. But i've recently developed a liking for them. Right now I'm listening to rush songs on Sirius XM while hacking out some bugs & Its actually making life a little more enjoyable during de-bugging! !Recommend!

     

    Anyone else with good some good tune recommendations?


  4. Nice links. Our site has something just like the example used for its online magazine. You can control the page flip anywhere much like a real piece of paper, and its completely developed using jquery as well. I spend some time playing with it when i first started :)

     

    --update to this post---- after posting i thought about it and went and looked again.. Ours was done in Flash. Sorry about that


  5. I was looking around a little bit with this topic in mind. I found this link here that might be useful to your css selectors jbwebdesign.

     

    Im assumeing your css file had something like this to decorate your id:

     

    #user_id {

    xxxxxx: xx

    }

     

    change the hash to a full stop (.) to make it identify the class.

     

    .user_id {

    xxxxxxx: xx

    }


  6. Without actually testing it and playing with it looks to me like if you changed

    <input type="hidden" id="user_id" .....

     

    with

     

    <input type="hidden" class="user_id" .....

     

    it may work. Like falken mentioned, when you use id it needs to be unique. Your code gets looped, so the output gives multiple id's the way it is.

  7. Arrays


    so I have an array (shipping) with a bunch of indexes. Such as name, address country etc.

    I am able to debug and see whats in my array.

     

    array

    'firstName' => string 'Jordan' (length=6)

    'lastName' => string 'Stern' (length=5)

    'street1' => string '35 7th St Nw' (length=12)

    'city' => string 'Bayamon' (length=7)

    'province' => string 'choose' (length=6)

    'province_hidden' => string '1' (length=1)

    'country' => string 'choose' (length=6)

    'country_hidden' => string '1' (length=1)

    'zip' => string 'GY3 5HB' (length=7)

    'phone' => string '4035291110' (length=10)

    'business' => string 'Dev' (length=3)

    'province_other' => string 'Puerto Rico' (length=11)

    'country_other' => string 'Puerto Rico' (length=3)

     

    I want to access 'country_other' so if a customer puts 'puetro rico' php can change it to usa.

     

    I did this:

    if (strtolower($this->post['shipping']['country_other']) == 'puerto rico') {

    $this->post['shipping']['country_other'] = 'usa';

    }

     

    And it works when i debug:

     

    array

    'firstName' => string 'Jordan' (length=6)

    'lastName' => string 'Stern' (length=5)

    'street1' => string '35 7th St Nw' (length=12)

    'city' => string 'Bayamon' (length=7)

    'province' => string 'choose' (length=6)

    'province_hidden' => string '1' (length=1)

    'country' => string 'choose' (length=6)

    'country_hidden' => string '1' (length=1)

    'zip' => string 'GY3 5HB' (length=7)

    'phone' => string '4035291110' (length=10)

    'business' => string 'Dev' (length=3)

    'province_other' => string 'Puerto Rico' (length=11)

    'country_other' => string 'usa' (length=3)

     

    But when I take my var_dump($this->post['shipping']) out, I get: "Undefined index: shipping in C:\dev\trunk\application\controllers\CheckoutController.php on line 972"

     

    which is the same line as " if (strtolower($this->post['shipping']['country_other']) == 'puerto rico') {"

     

     

    Any ideas?

×
×
  • Create New...