Jump to content

uknowho008

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

uknowho008's Achievements

Member

Member (2/5)

0

Reputation

  1. Hey guys, I'm setting up a new e-commerce website for a lighting design company called Johnson Art Studio. Anyways, I'm trying to figure out a good way to calculate tax and maybe shipping. we will probably just include shipping in the price for now. But as for tax, I can't find very much information on it. I'm building my own shopping cart and using paypal and google checkout for now. I figured paypal and google could calculate tax for me depending on the persons address but I still need to manually go in and set tax rates for every zip code, which doesn't seem reasonable to me. Is there some way people usually go about doing this? Thank you.
  2. I'm in the very early stages of making building a shopping cart. The problem is when I add a product to my cart in firefox it add's two of them instead of one but it works fine in IE. I can't figure out what the problem is. Here is the code. function RequestClean($object) { $object = htmlentities(trim(addslashes($_REQUEST["$object"]))); return $object; } function AddTo() { $ModelNum = RequestClean("ModelNum"); $Glass = RequestClean("Glass"); $Metal = RequestClean("Metal"); $Quantity = RequestClean("Quantity"); if($ModelNum AND $Glass AND $Metal AND $Quantity) { $_SESSION["Cart"][] = array("ModelNum"=>"$ModelNum", "Glass"=>"$Glass", "Metal"=>"$Metal", "Quantity"=>$Quantity); } } if(IsSet($_REQUEST["AddTo"])) { AddTo(); } elseif(IsSet($_REQUEST["ClearCart"])) { session_destroy(); $_SESSION["Cart"] = ""; }
  3. Thats strange. it seems to work this time???? http://johnsonartstudio.com/productpages/exterior/cylinder_framesset.htm I'll try and fix the rest and hopefully they all work. Thank you Thank you!
  4. I haven't either, thats the first thing I did but I think was happened was it made the page black but nothing else changed.
  5. Hi, I just got started working part time helping with some IT stuff for this company. Anyway, I need to get these pages to work in firefox. For some reason they work fine in IE but not Firefox, and whats even more strange is that it works fine from the files on my computer, but it doesn't work when viewing the actual website. I'm sure its something totally simple but I don't know anything about frames. Go here then click on a lamp and you'll see what I mean. http://johnsonartstudio.com/lanterns_roundacrylic.htm Thanks guys.
  6. /www is at the root of your filing system. not the root of your virtual host. also you may need a Server Alias for each virtual host. not sure though.
  7. Thanks but that didnt work. the footer div sits right under the SideNav and underneath the content div.
  8. hi, i converted my site from tables to divs a while back which was a mojor headache. but it has worked fine since. until now. i am trying to add a footer about the same size and style as my header. in source i placed the div right after the sidebar div within my container div. and in css i added width of 100% and height of 50px as well as a background color. i tried a bunch of different things but cant figure out how to keep the content div from over lapping. i would also like the sidebar to continue to the bottom of the page. when i first set up the site with divs i placed the sidebar after content in source so content would load before the sidebar which might have been a bad idea. i dont know. anyway, help would be greatly appriciated. i am also open to different design routes to get the same layout. thanks here is the site http://korruptindustries.com/korruptb4/home/index.php here is the style sheet http://korruptindustries.com/korruptb4/includes/css/korrupt.css there is another style sheet for the header but i didnt think that was necessary im sure you can figure out how to get it if you need to also i didnt upload the page with the footer div as i didnt want the site to be messed up. thanks again.
  9. cool the @ sign worked for that. so if anybody can figure out why some feeds dont throw up errors but dont seem to have anything extracted from them either i will stop bothering you . could it be because they are "atom"? im not sure what difference that makes. or id they are atom or not. thanks..
  10. just throw @ in front of the function? ill give that a try. what else would you like to know? i put in this if statement so at least its not outputting nothing when the array is empty. but i dont know why this is happening int the first place. if($f_items) { $NewsBlock = "<div class=\"RssFeed\"><h1><a href=\"$f_channel[link]\">$f_channel[title]</a></h1><ul>"; // iterate through items array for ($x=0; $x<$MaxItems; $x++) { if (is_array($f_items[$x])) { // print data $item = $f_items[$x]; //$DescID = preg_replace('/[^a-z]/i','',$item[title]); $NewsBlock .= "<li><a href=\"$item[link]\" title=\"$item[title]\">$item[title]</a></li>"; } } $NewsBlock .= "</ul></div>"; } else { $NewsBlock = "<div class=\"RssFeed\"><h1>Error</h1><ul><li>There was an error retrieving this feed.<br />$RssFile</li></ul></div>"; } thanks for the help. let me know what more information you need and ill see what i can do. thanks.
  11. hi, im using this script that somebody else has made. well some feeds work just fine, some feeds end up with nothing in the item array at all and some feeds come up with this fopen error. **EDIT** nevermind on the fopen problem. i cant believe i didnt catch that. feed://http//www.standardbyke.com/blog/?feed=rss2 haha **RE-EDIT** actually, it would still be nice to know how to make my own error message instead of just killing the entire script because of an fopen error. thanks guys. but i would still like some help with this if possible. this is a feed that makes it through fopen and all the checks but comes out with nothing in the array. http://brickhousebikes.blogspot.com/feeds/posts/default here is the script class RDFParser { // // variables // // set up local variables for this class var $currentTag = ""; var $flag = ""; var $count = 0; // this is an associative array of channel data with keys ("title", "link", "description") var $channel = array(); // this is an array of arrays, with each array element representing an <item> // each outer array element is itself an associative array // with keys ("title", "link", "description") var $items = array(); // // methods // // set the name of the RDF file to parse // this is usually a local file // you may set it to a remote file if your PHP build supports URL fopen() function setResource($file) { $this->file = $file; } // parse the RDF file set with setResource() // this populates the $channel and $items arrays function parseResource() { // create parser $this->xp = xml_parser_create(); // set object reference xml_set_object($this->xp, $this); // set handlers and parser options xml_set_element_handler($this->xp, "elementBegin", "elementEnd"); xml_set_character_data_handler($this->xp, "characterData"); xml_parser_set_option($this->xp, XML_OPTION_CASE_FOLDING, TRUE); xml_parser_set_option($this->xp, XML_OPTION_SKIP_WHITE, TRUE); // read XML file if (!($fp = fopen($this->file, "r"))) { die("Could not read $this->file"); } // parse data while ($xml = fread($fp, 4096)) { if (!xml_parse($this->xp, $xml, feof($fp))) { die("XML parser error: " . xml_error_string(xml_get_error_code($this->xp))); } } // destroy parser xml_parser_free($this->xp); } // opening tag handler function elementBegin($parser, $name, $attributes) { $this->currentTag = $name; // set flag if entering <channel> or <item> block if ($name == "ITEM") { $this->flag = 1; } else if ($name == "CHANNEL") { $this->flag = 2; } } // closing tag handler function elementEnd($parser, $name) { $this->currentTag = ""; // set flag if exiting <channel> or <item> block if ($name == "ITEM") { $this->count++; $this->flag = 0; } else if ($name == "CHANNEL") { $this->flag = 0; } } // character data handler function characterData($parser, $data) { $data = trim(htmlspecialchars($data)); if ($this->currentTag == "TITLE" || $this->currentTag == "LINK" || $this->currentTag == "DESCRIPTION") { // add data to $channels[] or $items[] array if ($this->flag == 1) { $this->items[$this->count][strtolower($this->currentTag)] .= $data; } else if ($this->flag == 2) { $this->channel[strtolower($this->currentTag)] .= $data; } } } // return an associative array containing channel information // (the $channel[] array) function getChannelInfo() { return $this->channel; } // return an associative array of arrays containing item information // (the $items[] array) function getItems() { return $this->items; } } and here is what im using to run it // get and parse $f = new RDFParser(); $f->setResource("$RssFile"); $f->parseResource(); $f_channel = $f->getChannelInfo(); $f_items = $f->getItems(); // now format and print it... $NewsBlock = "<div class=\"RssFeed\"><h1><a href=\"$f_channel[link]\">$f_channel[title]</a></h1><ul>"; // iterate through items array for ($x=0; $x<$MaxItems; $x++) { if (is_array($f_items[$x])) { // print data $item = $f_items[$x]; $NewsBlock .= "<li><a href=\"$item[link]\" title=\"$item[title]\">$item[title]</a></li>"; } } $NewsBlock .= "</ul></div>"; any help with this would be awesome. if nothing else, it would be nice to not have the script just die when fopen fails and be able to put in my own error message instead. thanks.
  12. ok i figured out how to make it comply with xhtml standards. but i still would like to know how to run this function with the id if possible. thanks.
  13. it looks like xhtml doesnt validate with "name" for the form. so i might need a whole new way of doing this. so does can anybody help me find a way to do this that still validates xhtml? thanks.
×
×
  • 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.