New Zenner
- Join Date:
- Jul 2006
- Posts:
- 35
- Plugin Contributions:
- 1
Pay to register
I am currently trying to extend some script modifications which Chrome Orange posted in June 2004 to force a user to pay for registration before being able to do anything else.
The code uses an SQL statement to add a product automatically to the users cart when they create a new account:
//Add Membership to cart
$sql ="INSERT INTO " . TABLE_CUSTOMERS_BASKET . " (customers_basket_id, customers_id, products_id, customers_basket_quantity, final_price, customers_basket_date_added)
VALUES
('', '" . $_SESSION['customer_id'] . "', '1', '1', '0', now())";
$db->Execute($sql);
//Add Membership to cart
This works fine, however I'd like the user to be able to download a 'welcome pack' of PDFs once they have paid for registration and assume that making the download an attribute of the purchase is the most sensible way to do this.
I have attributed the PDF to the product OK but can't figure out how to make the download attribute appear as part of the transaction. ie: the user needs to click a radio button on the product page to select the download but this modification deliberately by-passes the product pages.
Does anyone know how I can extend the SQL above to include a specific attribute automatically?
ColinR