Learn How to Create a Shopping Cart using PHP and MySQL - Part 7

  Рет қаралды 2,802

Eduonix Learning Solutions

Eduonix Learning Solutions

Күн бұрын

Пікірлер: 7
@CristiManolescu
@CristiManolescu 7 жыл бұрын
Hi! It is possible to give us the source, with the template and php integrated + mysql ?
@eduonixsupport1889
@eduonixsupport1889 7 жыл бұрын
You can download the resource file from below link. s3.amazonaws.com/edu-resources/Projectsin-PHPand-MySQL/resource-PayPalCheckout.zip
@eugenegrassie6477
@eugenegrassie6477 7 жыл бұрын
Thank you for an awesome tutorial. I completed the entire project, and I actually learned something. However... the categories are now dynamic, and when you click on it, it takes you to the page of that category. That's good. But could you please assist us to create/finalise the page the category url takes us to, and then only show the items in that category? Thank you once again for doing a wonderfull job. Regards
@eduonixsupport1889
@eduonixsupport1889 7 жыл бұрын
You mean when we click on category link you want to display products under that category.
@eugenegrassie6477
@eugenegrassie6477 7 жыл бұрын
Eduonix Support yes sir. When you click on the category, to only show that category. Thank you again. Regards
@eduonixsupport1889
@eduonixsupport1889 7 жыл бұрын
Add below code in 1)Product_model.php file //get products in the category public function get_category_products($category_id){ $this->db->select('*'); $this->db->from('products'); $this->db->where('category_id',$category_id); $query = $this->db->get(); return $query->result(); } 2)add this into products.php file of controller public function category($id){ //get product details //2 nd change $data['products'] =$this->product_model->get_category_products($id); //Load View $data['main_content'] = 'category'; $this->load->view('layouts/main', $data); } 3)add this into category.php file of view
@eugenegrassie6477
@eugenegrassie6477 7 жыл бұрын
That worked perfectly. Thank you very very much. Just 1 problem I found. In the products.php under controller, the P that i put in () needs to be a Capital P for the code to work. Your code: $data['products'] =$this->product_model->get_category_products($id); but for the code to work without errors, it must be: $data['products'] =$this->Product_model->get_category_products($id);
Learn How to Create a Shopping Cart using PHP and MySQL - Part 8
20:23
Eduonix Learning Solutions
Рет қаралды 3,8 М.
Learn How to Create a Shopping Cart using PHP and MySQL | Part 6 | Eduonix
23:37
Eduonix Learning Solutions
Рет қаралды 4,3 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Learn to Design a PHP Quizzer using PHP and MySQL | Eduonix
22:32
Eduonix Learning Solutions
Рет қаралды 42 М.
Forget WiFi AGAIN! This Wireless Method is WAY Better?
12:05
GreatScott!
Рет қаралды 39 М.
Samsung S25 Ultra Hands On - The New Era
17:06
Mrwhosetheboss
Рет қаралды 4,7 МЛН
Every Minute One Person Is Eliminated
34:46
MrBeast
Рет қаралды 36 МЛН
You are using G-Sync wrong (probably)
7:51
techless
Рет қаралды 109 М.
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН