Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $this->EE =& get_instance();
- $this->EE->load->add_package_path(PATH_THIRD.'cartthrob/');
- $this->EE->load->library('cartthrob_loader');
- $params = array(
- 'product_id' => 37, //your entry_id
- 'item_options' => array(), //ie, 'product_size' => 'L',
- 'quantity' => 1,
- 'class' => 'product',
- );
- $this->EE->cartthrob->cart->add_item($params);
Add Comment
Please, Sign In to add comment