Adding User Text to a specific item when adding it to the order

1 view
Skip to first unread message

Hojo

unread,
Jan 22, 2009, 1:36:28 PM1/22/09
to phpShop
I have just installed phpshop 0.8.1 and it looks great so far. I am
about to try and install the Ulisoft.org Paypal module as this is how
all our customers will be paying...

I have a requirement for the user to add some TEXT to a some product
items (but not all items) which will allow them to customize those
product with their own text. It's possible they might order multiples
of this item with different custom text for each one ordered, these
would have to be treated as separate items in the order since the
custom text would be different for each.

What I've set up is a product with a "Custom" attribute and two
product items, one with "Text Added" and one without.

First, is this the best structure? Would it be better to treat this as
two completely different products?

Second, Where would I need to make changes?

1. Add the user input field so they can type the custom text they
want, should be part or the item added to the order, can be required
before "Add to Order" is pressed or requested when it is pressed.
2. Confirm this selected text, as part of a specific item in the order
(before accepting the order and in the e-mail order confirmation)
3. So it shows as part of the item ordered (order_item table?)


I'm sure some of this I can figure out by stepping through the code
but there's a lot of it so any pointers/shortcuts would be
appreciated....

Jeff Newman

unread,
Jan 22, 2009, 3:43:20 PM1/22/09
to php...@googlegroups.com
what you could do is just create a new field in the order_items table called
"custom", and have a field on the flypage where they enter that data. when
the item is added to the cart, just create a new cart field called custom
and store it along with the product_id. when you get to the checkout
process, just make sure the content of that new cart field is put in the new
custom field in order_items.

things to update:

checkout/ps_checkout - you'll need to update the add() and paypal_add()
functions, as well as the send_email() function
those will all need the cart value displayed at some point or stored
in the DB

shop/ps_cart - you'll need to update the add() function so that it puts your
custom field from the flypage into the cart

checkout/thankyou - you'll need to display the custom field content under
the product listings

order/order_print - same as thankyou page, but for the backend.

i think that should do.
--------------------------------------------------------------------------------



No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.10.12/1909 - Release Date: 1/22/2009
7:08 AM

jnewman67

unread,
Jan 22, 2009, 4:05:23 PM1/22/09
to phpShop
by the way, refer to my historical data post for more detailed
specifics - it points out specific places that you may want to update.
> ---------------------------------------------------------------------------­-----
>
> No virus found in this incoming message.
> Checked by AVG -http://www.avg.com
> Version: 8.0.176 / Virus Database: 270.10.12/1909 - Release Date: 1/22/2009
> 7:08 AM- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages