How to attribute extra field to shopping cart?

10 views
Skip to first unread message

Binbin

unread,
Nov 24, 2009, 3:55:34 AM11/24/09
to Satchmo users
Our client wants to add a capability to allow user to define a gift
message that will be printed out and enclosed in the shipping package.
Summarized requirements:

1. This message can be defined at the stage of managing shopping cart.
( Our site has NO user registration, purely cookie-based. )
2. This message will appear in user's shopping cart and order detail.

I considered two possible solution:

1. Save that text message with cookie. ( This message will be within
the limitation of a cookie)
2. Save that text message as a field of satchmo shopping cart.

Just as a rough impression, a cookie will not work well enough, and I
would prefer going with a cart field. So, my question is, will it be
practical/logical to additionally attribute a satchmo cart?

Bob Waycott

unread,
Nov 24, 2009, 8:23:49 AM11/24/09
to satchm...@googlegroups.com
Assuming that a gift message could be applied to a product, you should be able to add your message to the CartItemDetails model via the satchmo_cart_details_query() signal.

An example of this is shown here:


Best,

Bob


--

You received this message because you are subscribed to the Google Groups "Satchmo users" group.
To post to this group, send email to satchm...@googlegroups.com.
To unsubscribe from this group, send email to satchmo-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.



Binbin

unread,
Nov 24, 2009, 9:42:27 AM11/24/09
to Satchmo users
Hi Bob, thanks. Unfortunately, this does not seem what I want.
Actually I have already been using the CartItemDetails to solve the
similar problem, e.g., an extra field defined by shopper that is
applied to a product.

What I really want here is something like CartDetail vs.
CartItemDetail, even from the name itself the CartDetail will make
much more sense. I wanted to see if this is logical from a developing
standpoint.

I think I will update this message in a later time when I got more
from my current research.

Best,
Bin

Hernan

unread,
Nov 25, 2009, 10:39:26 AM11/25/09
to satchm...@googlegroups.com
Have anyone integrated Papal Website Payments Pro with satchmo ??

- lifewithryan I think you are in this list I saw your post in bitbucket saying about new files that work fine and fixed a few bugs, can you upload those files somewhere ?

Thanks in advanced.

lifewithryan

unread,
Nov 25, 2009, 11:27:09 AM11/25/09
to satchm...@googlegroups.com
Yes - we jabe a working implementation. I will try to collect the
files and place them on bitbucket as soon as ai can. Been busy with
holiday stuff and work.

The good news is that we are taking orders and things are working.
The bad news is that it's poorly documented at this point, could be a
little cleaner, and assumes you've got your paypal side of things
setup correctly (of course). After of fact, setting up paypal was
probablyore of a pain than getting our module to work.

Sent from my iPod

Hernan

unread,
Nov 25, 2009, 11:54:14 AM11/25/09
to satchm...@googlegroups.com
Thanks!! I appreciate the quick response - please let me know when you get those files up, any advice
on getting it working is very welcome :))

Ryan Headley

unread,
Nov 25, 2009, 9:43:28 PM11/25/09
to satchm...@googlegroups.com
Okay...attached is a zip file containing our urls.py, config.py, classes.py, processor.py and views.py for using Website Payments Pro's API (name value pairs implementation).

Extract the tar gz file in a directory called website_payments_pro "sister-level" to your other django/satchmo apps.

In settings.py add 'website_payments_pro' to your INSTALLED_APPS, and near the bottom of your settings.py file in the SATCHMO_SETTINGS dict, add:
'CUSTOM_PAYMENT_MODULES'  : ('website_payments_pro',),

When you start your satchmo app and go to settings, you "should" see Website Payments Pro as a selectable item in the Payment Settings section.  Upon saving, you'll get a Website Payments Pro section at the bottom of the list.  This is where you'll configure stuff.

Now for the Paypal stuff:

You need to follow their sandbox instructions to the letter.  Setup a sandbox, create an API Username, Password and Key for the sandbox.  As long as you are not accepting "live" payments in Satchmo, you should be using these credentials.  Once you go live, you'll need to create yet another API Username, password and Key and use those for live transactions.

You'll need to create a test credit card in the sandbox.  I suggest creating a test Visa and test Amex at the very least.  Those will be the only "cards" that work in your sandbox.  (Thought I've been told by the paypal folks that sending a valid card to the sandbox will still work).

I will try to work up some official documentation and if Chris or Bruce is reading this, feel free to take a look at this stuff and add it to satchmo or bursar if you like it.
--
http://www.sudovi.com/
http://www.twitter.com/lifewithryan
http://www.thecommontongue.com
http://www.lifewithryan.com/
wppro.tar.gz

Hernan

unread,
Nov 26, 2009, 12:09:26 AM11/26/09
to satchm...@googlegroups.com
I will implement and let you know how it goes, thanks for the files and writing the steps to integrate it,  I think this would be a great feature to integrate in the next satchmo version.
:)


<wppro.tar.gz>

Hernan

unread,
Nov 27, 2009, 1:53:30 AM11/27/09
to satchm...@googlegroups.com
I followed your instructions, created test account in paypal sanbox all worked great!
Only problem I found is if you have State as mandatory in
/settings --> Satchmo Shop Settings.
I was getting this error when processing the test transaction "There's an error with this transaction. Please enter a valid state in the billing address."
Would that be because satchmo's field name is not what paypal is specting ?

Thanks!!


On Nov 25, 2009, at 9:43 PM, Ryan Headley wrote:

> <wppro.tar.gz>

Ryan Headley

unread,
Nov 27, 2009, 8:24:47 PM11/27/09
to satchm...@googlegroups.com
I doubt that is it.  Are you sure your forms are requreing state and that state is coming across in the post?

Paypal's API requires state so if you aren't sending it...its not gonna work.

Hernan

unread,
Nov 30, 2009, 3:00:58 PM11/30/09
to satchm...@googlegroups.com
I was having the same issue with FEDEX the problem was the State value in store configuration was not setup right.
Now the issue i'm facing is Fedex only provides Ground option for shipping, did anyone came up with a solution for this ??

Thanks.
Reply all
Reply to author
Forward
0 new messages