Textpattern Forum

You are not logged in. Register | Login | Help

#641 2012-02-02 21:01:33

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,909
Website

Re: yab_shop (simple textpattern shop with paypal support)

I took a look at the code yesterday and building in support for multi promo codes isn’t hard. Takes a bit of refactoring of the cart to actually stash the code being used instead of just stashing a 1 (= “promo code in use”). That’s necessary so the code can be looked up when it comes to applying the discount value to each product.

And on that note I found a handy hint by trenc in the plugin help that might explain why only percentage knockdowns are permitted:

Absolute discounts like 5€ on all products are not supported due the lack of support by paypal and google checkout.

So that explains that one :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#642 2012-02-03 06:39:15

Angelic Relic
New Member
From: Willits, California
Registered: 2012-01-01
Posts: 6
Website

Re: yab_shop (simple textpattern shop with paypal support)

Thank You * * * Thank You * * * Thank You Manaus
This has been driving me nuts
Your solution is perfect
Thanks again…………………

Manaus wrote:

Men I just managed to get it right: just put the checkout tag within the shop_cart tag, like this:

<txp:yab_shop_cart>
  <txp:yab_shop_checkout />
</txp:yab_shop_cart>

Cheers

Offline

#643 2012-02-03 09:02:08

tom1
Member
Registered: 2009-03-20
Posts: 36

Re: yab_shop (simple textpattern shop with paypal support)

Bloke wrote:

Absolute discounts like 5€ on all products are not supported due the lack of support by paypal and google checkout.
So that explains that one :-)

Why should payment aggretator even know how total price is made up? Isnt total price to pay and return url usually enough, or does Paypal handle shopping cart contents aswell nowdays?

Offline

#644 2012-02-03 14:20:09

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,909
Website

Re: yab_shop (simple textpattern shop with paypal support)

tom1 wrote:

Isnt total price to pay and return url usually enough, or does Paypal handle shopping cart contents aswell nowdays?

It does indeed. It itemises stuff on the invoice and takes a whole cart as input.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#645 2012-02-03 14:57:50

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,085

Re: yab_shop (simple textpattern shop with paypal support)

Bloke wrote:

It itemises stuff on the invoice and takes a whole cart as input.

One more nose poking where it doesn’t belong :-/


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#646 2012-02-06 14:12:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,909
Website

Re: yab_shop (simple textpattern shop with paypal support)

uli wrote:

One more nose poking where it doesn’t belong :-/

Yeah, or a “fraud prevention/detection mechanism” depending on which side of the fence you stand.

Incidentally, I added rudimentary multi-promo code support. You can list the promocodes from the yab_shop prefs, supplying an equal number of discount percentages in the box beneath: first code maps to first discount % value, 2nd code maps to 2nd discount value, and so forth. Handy.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#647 2012-02-07 03:05:09

hidalgo
Member
From: Australia
Registered: 2008-02-05
Posts: 49
Website

Re: yab_shop (simple textpattern shop with paypal support)

Hi Stef, multi-promo code support is something I could most definitely use, even if it’s just rudimentary!

Ultimately, it would be great if promo codes could have their own extension tab so that users with less privileges could manage them separately from the core preferences.

I’m really glad that there’s talk of reviving/expanding this great plugin.

Last edited by hidalgo (2012-02-07 03:16:36)

Offline

#648 2012-02-07 16:24:53

progre55
Member
Registered: 2006-05-02
Posts: 642

Re: yab_shop (simple textpattern shop with paypal support)

maniqui/bloke (or anyone else)

Still hoping to find an answer for this question —-

(1) I need to add a dropdown box to the form. I have modified the form before — but only by adding new input fields —-

Thanks.

progre55

Offline

#649 2012-02-08 16:30:02

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,909
Website

Re: yab_shop (simple textpattern shop with paypal support)

progre55 wrote:

I need to add a dropdown box to the form.

What form? You should have control over what options you display by using the cart / checkout as a container. If you mean on the ‘add to cart’ side of things, you specify product variants in custom fields and the drodown boxes are automatically populated. What input are you trying to capture?

all

As has become apparent from recent forum posts, trenc has taken a back seat on this excellent plugin for the time being. Perhaps when Txp 5 comes along it can be rewritten, but for now he has given me his blessing to take over day-to-day maintenance (need to get my site in order before I can host it).

Although I’ve still got a few things to track down, I’ve begun work on making the next version generally usable by adding an upgrade section which makes the necessary DB changes and stuff. I’ve rolled it into a single 4000+ line monstrosity plugin and I’ll go through the help at some point to document the new stuff.

Because of MLP support, there’s no need for the yab_shop language tab any more — even for those people not runninng MLP. The downside is that the upgrade will reset the strings back to the ones in the plugin — some of them have actually changed quite drastically with dynamic {values} inserted into them depending on the configuration of other settings.

I’m thinking about how to to handle this properly — perhaps with Textpacks — so your strings remain and only new ones are added. Or perhaps it advises you of which ones are different and allows you to choose the ones to overwrite on upgrade. But since I have no “old” v.0.8.0 shop I’ve no place to test such an upgrade.

Bet you can see what’s coming: willing volunteers please to test out an upgrade in a non-production database so it doesn’t really matter if the plugin stomps on your strings.

To reiterate, at the moment there’s no yummy migration path for plugin strings so if you have a blank slate, the new plugin will work fine and you may request a beta copy once I’ve done the docs. This is just a heads-up for people wanting to upgrade existing shops: I’d love to have someone try it out when I’ve written the code to manage the string migration. And of course, if anyone can think of a neat way to manage single-language strings on upgrades, please let me know.

The good news is that once on v0.90, most of the strings are more generic and don’t have hard-coded numbers in any more so they should function like regular strings and can safely be updated (if necessary) in future versions. The only places where things get a little hairy are in strings like “This text will be on the end of the admin mail”. This is partly solved with the new admin e-mail Forms so you can entirely customise an e-mail template and you can thus elect not go near the language table. Ideas on what to do in this grey area welcome.

Anyway, I’ll post more as I have it.

Last edited by Bloke (2012-02-08 16:30:32)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#650 2012-02-11 23:15:44

maniqui
Moderator
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 2,989
Website

Re: yab_shop (simple textpattern shop with paypal support)

Thinking aloud, hope anyone coould confirm some thoughts/findings:

On a website currently running v0.8.0, client noticed that order/affirmation emails weren’t arriving to shop admin nor to buyer, respectively.
I skimmed over the code and find, at function yab_shop_checkout, that order/affirmation emails are only sent in the case that the payment methods aren’t PayPal or Google Checkout.

After a little WTF moment, I got to understand that this is a logic/expected way to work. In other words, it will be probably wrong, from a usability POV, to be sending emails during the checkout process but before the buyer confirming the purchase (i.e. doing the payment) via PayPal or Google Checkout. This would be wrong, for example, if after doing the checkout (hitting the checkout button in form and being redirected to PayPal) the buyer decides not to do the purchase. By that time, emails (wrongly) confirming purchase would have been already sent.

I suppose that’s where PayPal IPN (and so, smd_ipn) could enter the game & help to improve both buyer & seller experience (buyer getting some extra confirmation with the details of the purchase, and seller too).
Are these thoughts correct?

Thanks!


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

Board footer

Powered by FluxBB