Using code, how would we give a Magento item a one-time special price then add that item to the shopping cart?
The process is simple:
- Create an instance of the Magento product,
- give it a custom price by calling setSpecialPrice,
- then save the product instance (store must be running as the admin store).
- Next, grab the Magento cart object (a singleton),
- add the product instance to the cart,
- then save the cart.

Want to make your store name stand out on your PDF invoice (example to the right)?