Jump to content

Extending/Changing Cart/Order


aaragus

Recommended Posts

Good evening to all!

 

I have recently gotten started on making a module for Prestashop and have ran into a bit of a barrier. I have added a bunch of dropdown information onto the product using hooks, they show up as expected and I can select the information. Once selected what I want to happen is for that information to show up on the order, in the back office as well as the e-mail sent out to the client. I can make whatever coding changes are needed.

 

Today I tried to extend the Cart Controller

This CartController.php file is in the /override/controllers folder:

<?php
class CartController extends CartControllerCore
{
public function preProcess()
{
 parent::preProcess();
 $sql = 'insert into
	table
 (id_cart)
   values
	 (`'.self::$cart->id.'`)';

 Db::getInstance()->ExecuteS($sql);
}
}
?>

 

yet nothing happens when I add a product.

 

Is there another way I can do this?

 

Any help would be greatly appreciated.

 

Darryl

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...