
1cookie
Members-
Content Count
24 -
Joined
-
Last visited
Community Reputation
1 NeutralAbout 1cookie
-
Rank
Member
-
No, there is no mention of edit_page.page but, like I said edit_page.php IS mentioned. From page 311: <h1><span><?php echo $page-> getDateAdded(); ?></span><?php echo $page->getTitle(); ?></h1> <?php echo $page->getContent(); ?> <?php if ($user && $user-> canEditPage($page)) { echo '<p><a href="edit_page. php?id='. $page->getId() . '">EDIT</a></p>'; } ?> and from the scripts: <!-- # page.html - Script 9.10 --> <section class="fullWidth"> <article> <h1&g
-
Extending The Database Model
1cookie replied to 1cookie's topic in Effortless E-Commerce with PHP and MySQL
You're right, it's staring me right in the face. URL params is a better way me thinks. Do you mean like a bootstrap (index.php) file for instance? Similar to: if (isset($_GET['p'])) { $p = $_GET['p']; } elseif (isset($_POST['p'])) { // Forms $p = $_POST['p']; } else { $p = NULL; } switch ($p) { case 'price': $page = new Price; break; case 'size': $page = new Size; break; case 'colour': $page = new Colour; break; default: $page = new Main; break; } // switch. if (!is_object( $page)) { $page = new Main; } include('./includes/header.html'); $page->load(); include- 12 replies
-
- mysql
- stored procedures
-
(and 1 more)
Tagged with:
-
Extending The Database Model
1cookie replied to 1cookie's topic in Effortless E-Commerce with PHP and MySQL
thanks. Yes, I could scratch the prices table maybe you have a point. A price should be in the Product table. I'm more comfortable with the singular term 'Product' as opposed to 'Products'. I'm going to stick with categories and products as separate entities. One category can have multiple products and a single product belongs in one category: one to many. Not sure about stock yet, mulling that over. For me I really want to be able to search on: category, designer, price, size and colour and so am torn between the stored procedure call and database model. My Stored Procedur- 12 replies
-
- mysql
- stored procedures
-
(and 1 more)
Tagged with:
-
Extending The Database Model
1cookie replied to 1cookie's topic in Effortless E-Commerce with PHP and MySQL
Indeed. And I acknowlege that. That's the idea of open source you share ideas collaboratively. I didn't say I'm struggling to understand or didn't get something. Although examples in the book are pretty rigorous from the start they're well taught by the author. That's not to say they couldn't become more difficult pretty quickly. For instance, in my denim jeanshop example, my revised products table may look like: -- ----------------------------------------------------- -- Table `default_schema`.`products` -- ----------------------------------------------------- CREATE TABLE- 12 replies
-
- mysql
- stored procedures
-
(and 1 more)
Tagged with:
-
hi Interesting book especially the stored procedures. I'd be interested to hear from anyone who is interested in extending or generalising the database; thus creating more variables to search upon. After all, not all of us want to sell coffee do we? I'm especially interested in filters or searching by specific categories see: http://acookson.org/wp-content/uploads/2013/01/shop-screenshot.png for an example of what's on my mind. In my fictitional jeans shop example, I was playing around with MySQL workbench to come up with some possibilities for an ER diagram: http://acooks
- 12 replies
-
- mysql
- stored procedures
-
(and 1 more)
Tagged with:
-
Error When Access Wishlist.Php And Cart.Php
1cookie replied to lewy009's topic in Effortless E-Commerce with PHP and MySQL
Boolean given - you passed FALSE (more likely NULL) into the stored procedure (query) when you should have passed a mysqli_result. Check the stored procedure for syntax errors. -
Test The Checkout.Php Process
1cookie replied to 1cookie's topic in Effortless E-Commerce with PHP and MySQL
If your using Linux, I found this to be a very good tutorial: https://www.linux.com/learn/tutorials/392099:creating-self-signed-ssl-certificates-for-apache-on-linux -
Test The Checkout.Php Process
1cookie replied to 1cookie's topic in Effortless E-Commerce with PHP and MySQL
thanks. What I have learnt is that if you want SSL encryption on ones localhost machine then it's going to involve creating your own digital certificates. -
Test The Checkout.Php Process
1cookie replied to 1cookie's topic in Effortless E-Commerce with PHP and MySQL
Indeed, that's my understanding. I'm using WAMP, but have access to Ubuntu (LAMP) also. sure... -
hi I'm just at page 282, chapter 10. Now you can test the checkout.php process. If you fill out the form incorrectly, it will be displayed again (Figure 10.13). If you fill it out correctly, you'll be sent to billing.php, which will be written next. I can't get to checkout.php over https on my localserver? https://localhost/coffeeLatte/checkout.php?session=c3e7255a9ec227b4c73b39af5c726792 Is this as expected?
-
Mysql, Innodb Engine And Stored Procedures
1cookie replied to 1cookie's topic in Effortless E-Commerce with PHP and MySQL
Too many variables for a definitive answer, that makes sense. I was being ambitious with 1000 sale items and 3000 users; that's nearly Amazon material! I suppose the best way to find out would be to deploy it, then watch the .log files for bottlenecks as the site evolves. Thanks for the insight.