Jump to content
Killersites Forums


  • Content Count

  • Joined

  • Last visited

Everything posted by jsmith1981

  1. Doing some great work to finally understand how to insert data into a database using JavaScript AJAX and PHP But the problem I'm having is this, when inserting say a post (a basic commenting system is what I am doing just for a kind of proof of concept sort of thing so I can understand whats going on as such) it inserts the post but needing to refresh the page to see the new comment/post/data Is there any better way of say doing this like so when inserting it automatically appears in the feed, have this essentially right now: function getComments() { var comments = docum
  2. Yea I did that and sadly they're both comparing so would return to be true, so there's nothing wrong within itself just it's not behaving the way I'd want it to. I actually played around with another example another developer was using and came up with this that works: case 'add': // we need all the details of the product so we can add it to the cart (the needed data that means) $sql = sprintf("SELECT id, name, price FROM products WHERE id = '%d'", $prodid); // query the products table: $result = mysql_query($sql); // if no result send the user back the the h
  3. // we need all the details of the product so we can add it to the cart (the needed data that means) $sql = sprintf("SELECT id, name, price FROM products WHERE id = '%d'", $prodid); // query the products table: $result = mysql_query($sql); // if no result send the user back the the home page: if(!$result) { header("Location: index.php"); // else construct the ability to add the product to the cart, if the result is true and counts for 1 row: } else if ($result && mysql_num_rows($result) == 1) { // get the one row: $row = mysql_fet
  4. I have some weird problem here, The code is: if($cart_count == 0) { $_SESSION['cart'][] = $tmp_product; } else if($cart_count > 0) { // if the array has anything in it: for($i=0; $i<$cart_count; $i++) { // loop through the array rows: // if the id of the product already is in there then add to it: if($_SESSION['cart'][$i]['id'] === $tmp_product['id']) { // adds to the already there qty: preincrement actually I think $_SESSION['cart'][$i]['qty'] += $tmp_product['qty']; } else {
  5. In a nut shell really all a proxy is (whether its a web site or server) is something that does some action on behalf of another. Put it simply you ask the proxy to do something (something it was obviously designed to do) and it will do that for you, then send you back that information without leaving any trace that it was you that wanted that. That's all proxy's are. Though to answer your question usually yes that kind of thing would work, but in reality it could be (I would have thought of the way you're describing the situation) it'd be more to do with a geographic aspect of your
  6. To answer your first one, some services on a site won't be available, like you won't be able to login for example (that's probably the biggest one), minor features of a site shouldn't be a problem but that's a big one being able to login for some sites, or purchasing items they usually (least in my experience in ecommerce web development) won't allow you to add things to a basket. Though having said that some do use a database structure and save the contents of your basket to their server (but you must have loads of data free to be able to do that if you're running a shop with allot of custome
  7. In a nutshell a management KVM/Qemu high end Virtualization, VirtualBox (have good old Windows 3.11 running, wanted to have some fun with QBASIC the first ever programming language I learnt to program in, had some old sessions work I used to do as a student, proper nostalgia, yes I would have to admit I am a real self confessed nerd ) and then my 2 live VPS's using KVM/Qemu. I run the local management KVM/Qemu in graphical mode on a host operating system with X Windows Server (gnome), basically because I couldn't seem to get the text version working like I used to be able to do, weird as
  8. Hmm not sure why this wasn't working but have got it now.
  9. I have a very basic (as simple as you can possibly get) ajax script. Problem is never seems to work when I type in, but when I compare line by line with the most basic example on the w3schools (again that works when I copy and paste, but I hate doing that, despise it personally with myself). Works when I copied and pasted, then compared line by line mine to theirs, but it's just still not working makes no sense to me at all. Could someone help me with this? function loadXMLDoc() { var xmlhttp; if(window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else { xml
  10. In fact no forget what I said it's working lol, going to get this into some kind of order then rock on with it. Playing around with theory's fun
  11. Oh no probs Andrea, I think I have this understood now, I think it's just the V part of MVC that's causing the problem. I thought why not just look into where you go when you look at the site, like home and whatever (index.php) is the kind of page it goes to (gets a bit confusing at times) but if I set it to go to the home page I have made in my logic I think it'll be fine. Because when I go to look at any of the products and using the breadcrumb plugin it goes back to the GET part of the address and finds the root category for products and displays them all, I might just put in some s
  12. Ok sorry I fixed the end of file problem, using this logic: <?php /* Template Name: Homepage */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly // get_header(); // this is now deactivated! get_header('shop'); do_action('woocommerce_before_main_content'); ?> <?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?> <h1 class="page-title"><?php woocommerce_page_title(); ?></h1><!-- page heading basically --> <?php endif; ?> <?php // do_action( 'woocommerce_archive_description' ); // keep this disabled for now ?
  13. Having problems integrating woocommerce. I am working on showing just a list of products to begin with, I mean taking the contents of 'archive-product.php' from the templates directory in the woocommerce plugin folder (don't need to explain where that is). I have got the following: <?php /* Template Name: Homepage */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly // get_header(); // this is now deactivated! get_header('shop'); /** * woocommerce_before_main_content hook * * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) *
  14. Rocking on with integrating woocommerce with my site template

  15. The banner (static element) I was having problems adding the banner further up, so thats fixed now, I was thinking about the problems with yea the text at the top, not enough contrast I will go through it with the person I am doing it for about yea the hiring part. It's more they are like an agent going between hiring companies and offering that. But I shall confirm, it's just on her facebook page I thought about keeping it the same as that but ideally I need to confirm. Thank you ever so much PS with regards to the comments I shall clear it up but it's just so I can remember where ev
  16. I am actually thinking of redoing (well not thinking will redo it at some point) but pondering using the same thing. A mentor of mine (who set up pitchspring for people to pitch new businesses and connect them with possible investors), used a similar thing in that you have say 3 things you do when going to that site. You're either a entrepreneur, an investor or (I actually can't remember the other) and it's just those options, taking you to a consultation contact page to book a call back with the investors if you're the earlier person/user. Quite cool stuff if you ask me personally (t
  17. Love this one "There's a golden Jesus thing." actually made me chuckle. It is rubbish though, shaking my head at the rest on the 2012, or whatever list. I have seen some I'm going to improve for places around here, geographically speaking of course, it's clear to me some of them (ok most of them), they've taken templates and tried to modify them without checking browser (or even knowing about) compatibility those make me weep more. Finally great post!
  18. Hello hope you're well? I found this (personally speaking of course) a great resource for starting off on your own http://www.siteground.com/tutorials/wordpress/wordpress_create_theme.htm Then just take things out of a theme you like the look of, get it down to its basic HTML (what I found good was this function <?php remove_filter ('the_content', 'wpautop'); ?> Every time you make any post it annoyingly puts in the p tags in every post (no matter what markup is in the post content, either side of your content it puts in yea the p tags. The above code removes them.
  19. I just wondered what people think of this site here (have been working on this exclusively): www.sweetsparklehampers.com As you can tell I haven't finished the grey bar (will eventually, like allot (ok all) of the menu's completely dynamic yet), but what's your honest opinions of it, I'd really like to hear them. Also what's your best advice of theme development with regards to woocommerce? I am not sure about how to integrate this (when I've finished the front page layout of the site). I want to make a good job of this since this is the first portfolio site I have done ever really.
  20. Basically this is what I have now and it works: .footer ul li { list-style-type:none; } Thanks ever so much again, your help's been amazing! Jeremy.
  21. I can't thank you enough for your latest post in helping me, thank you ever so much!

  22. You're beautiful and no haha I do that myself lol usually with me saying something like (when my managesieve pegeon service failed on my server, or I thought it did but something was just starring me in the face lol), I was like just said "you know what? slap me lol" Take care, Jeremy.

  23. No no you're quite alright haha thank you sooo much for your help, I can't tell you how much I appreciate that response. I thought I put that in further up, funny eh? Oh well I will defo try that, I thought it'd make more sense if I just copied in a screendump of what I was having problems with because I clearly confused myself haha with yea what you mentioned before haha. Thanks ever so much again, I am going to definitely post your great reply to my private servers blog (one that's not available on the Internet as all the ports are blocked), you're great thank you thank you thank you
  24. My own not so great but least it's up profile which is: http://jeremysmith.me.uk

    1. jsmith1981


      This was all thanks to both treehouse and killer sites that I managed to get both of these off the ground, though my profile one needs the same work as the below lol. Least I am getting there

  25. I have a new site I am working on at the moment using wordpress and woocommerce it's http://www.sweetsparklehampers.com/

  • Create New...