Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-11-12 18:36:11

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

wfCart session-based shopping cart with PayPal Checkout

i know txp-powered sites like http://popularweddingfavors.com/ use a variant of wfCart to power its paypal-based shopping cart. it was mentioned in Textpattern Solutions but the actual plugin (if there was to be one) never actually materialized.

recently i’ve been looking at the code within joe_gcart (basically also a simple wfCart session-based shopping cart only it works with google checkout) and find it may be pretty simple to change things up in order for it to work with paypal.

other than textcommerce (which is supposed to release a beta of its shopping cart plugin this week) i haven’t seen any others actively pursuing this area.

just curious if anyone else has attempted to tackle simple wfcart integration with paypal? if not, i’m gonna go ahead and see what my extremely rudimentary php skills can do ;P

Last edited by iblastoff (2007-11-12 18:36:50)

Offline

#2 2007-11-12 21:56:00

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: wfCart session-based shopping cart with PayPal Checkout

fatfreecart.com

Last edited by FireFusion (2007-11-12 21:56:31)

Offline

#3 2007-11-12 22:23:13

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: wfCart session-based shopping cart with PayPal Checkout

yah i’ve used fatfreecart for a super simple jewelry shop here already. but i think i’d prefer something that doesn’t rely on another server until actual checkout time.

plus fatfreecart relies on deprecated “target=“attributes as a fallback when javascript is disabled

Offline

#4 2007-11-13 03:53:27

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: wfCart session-based shopping cart with PayPal Checkout

well…here is what i have so far. just a default installation of textpattern with some ugly looking but (hopefully) working, session-based shopping cart functionality and checkout system for paypal.

my next step is to add the ability for item attributes (size, color, etc) as well as taxes. i don’t think it’ll be too hard.

Last edited by iblastoff (2007-11-13 03:57:28)

Offline

#5 2007-11-13 04:58:48

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: wfCart session-based shopping cart with PayPal Checkout

iblastoff

looks fine so far! Tested all the way through to the paypal billing information page. You might want to add a notice about cookies being needed to accurately track content of the cart — but for a one product purchase, the jump to the checkout page retains all needed information, even without cookies.

Very nice indeed.


Steve

Offline

#6 2007-11-13 09:58:39

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: wfCart session-based shopping cart with PayPal Checkout

FYI only, nothing functional with the plugin, but the comment link on the demo site leads to malformed output.

Last edited by net-carver (2007-11-14 05:19:55)


Steve

Offline

#7 2007-11-14 02:26:41

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: wfCart session-based shopping cart with PayPal Checkout

thanks steve! my name is steve too :P
that comment error is now fixed.

have also converted a few hardcoded outputs from joe_gcart to txp tags for customizing:
  • <txp:lam_paypalcart_count /> to display # of items currently in cart
  • <txp:lam_paypalcart_subtotal /> to display subtotal $
  • <txp:lam_paypalcart_grandtotal /> to display total $
  • <txp:lam_paypalcart_shippingtotal /> to display shipping total $

also added the ability to update quantity rather than just a simple ‘remove’ button. my php skill level is near none but i’m loving it so far! i thank textpattern for being a great development framework as well :)

of course the look of everything is still unstyled but i’ll come to that eventually.

things i need to learn how to do: somehow incorporate the ‘form’ attribute correctly in the plugin (ie <txp:lam_paypalcart form=“cart_form” />) and have the form output the aforementioned tags when they’re in the form. any tips (from anyone) on that would be great. currently i’m just spying within other plugins to see how they do this.

Last edited by iblastoff (2007-11-14 02:29:07)

Offline

#8 2007-11-14 05:38:50

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: wfCart session-based shopping cart with PayPal Checkout

iblastoff wrote:

my name is steve too :P

hehe, actually we have communicated before so, as a slight aside: did you ever get the afu plugin you requested from me? I have your emails requesting it but can’t see that I ever sent it to you.

that comment error is now fixed.

Have edited my post above.

somehow incorporate the ‘form’ attribute correctly in the plugin (ie <txp:lam_paypalcart form=“cart_form” />) and have the form output the aforementioned tags when they’re in the form. any tips (from anyone) on that would be great. currently i’m just spying within other plugins to see how they do this.

zem_contact_reborn might be of help. It uses a custom form — and in its absence has an internal, default form it then parses. Note the functions fetch_form() and parse()

$form = ($form) ? fetch_form($form) : $thing;
if (empty($form)) 
{
	$form = '<txp:zem_contact_text label="'.zem_contact_gTxt('name').'" /><br />
	<txp:zem_contact_email /><br />
	<txp:zem_contact_textarea /><br />
	<txp:zem_contact_submit />'; 
}
$form = parse($form);

Edited to add: If you followed that route, it would make lam_paypalcart an enclosing tag, giving your users three options…

  1. <txp:lam_paypalcart /> If they are happy with your default form.
  2. <txp:lam_paypalcart form='cart_form'/> To use cart_form for the tags.
  3. <txp:lam_paypalcart> ... tags go here ... </txp:lam_paypalcart> To include their custom layout on the same form/page template.

Hope that helps.

For what it’s worth, I’m very interested in this plugin and would be interested in taking a shot at using it with my pcf plugin to enable price splits — just like Rob did in Textpattern Solutions.

Last edited by net-carver (2007-11-25 07:16:04)


Steve

Offline

#9 2007-11-14 07:56:37

mattmikulla
Member
From: Nashville Tennessee
Registered: 2004-08-25
Posts: 281
Website

Re: wfCart session-based shopping cart with PayPal Checkout

Yea, I really want a shopping cart integrated solution. Would would really rock is the ability to accept coupon codes.

I’m hacking it together with javascript right now.


Art Rogue – Fine Art Photography

Offline

#10 2007-11-15 21:44:50

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: wfCart session-based shopping cart with PayPal Checkout

hey steve thanks for the tip! with your help i managed to get the usage of the form attribute working. woo! gonna add some minor but essential error checking now. i noticed on robs site popularweddingfavors.com i can still enter a quantity of something like “1.88” and it’ll give me a new total based on that clearly faulty quantity.

as for coupon codes, i guess it depends on how elaborate you need them to be. one way would be to simply add a custom field named “coupon code” and then just fill it in with your code for whichever products you want them to apply to. upon check out, check to see if a value for the custom field “coupon code” exists and matches what you specified then go on to subtract some set amount from the subtotal/grand total/shipping whatever.

Offline

#11 2007-11-16 09:39:42

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: wfCart session-based shopping cart with PayPal Checkout

iblastoff wrote:

hey steve thanks for the tip! with your help i managed to get the usage of the form attribute working. woo!

<grin>

I noticed on robs site popularweddingfavors.com i can still enter a quantity of something like “1.88” and it’ll give me a new total based on that clearly faulty quantity.

You should let Rob know about that directly. He doesn’t have a forum mail address but there’s a contact form on his site.

(I’ve also just sent him a pointer to your post above but a report from you would be better.)


Steve

Offline

#12 2007-11-30 04:19:42

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: wfCart session-based shopping cart with PayPal Checkout

Steve

any updates on this one?


Steve

Offline

Board footer

Powered by FluxBB