Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#721 2012-11-07 17:25:19
Re: yab_shop (simple textpattern shop with paypal support)
Just wanted to throw this out there as a candidate for inclusion:
A payment processor. stripe.com
- International Payments
- Can Stripe transfer to foreign (so non-US or Canadian) banks? Not yet.
txtstrap (Textpattern + Twitter Bootstrap + etc…)
Offline
#722 2012-11-07 21:09:40
Re: yab_shop (simple textpattern shop with paypal support)
I’m excited to give yab_shop a go! I intend to replace my current custom solution around Google Checkout with yab_shop for paypal support.
I have several questions re: shipping that weren’t obvious from the docs…
Is “Shipping Costs” in the config a % of purchase, or fixed price per item?
How does the “special shipping” cost work? Does it override the “Shipping Cost” or is it additive to the “Shippping Costs?”
Also, is there a way to do discount on shipping for subsequent items?
Google has an interesting feature, you can configure an amount for shipping the first item of the order (product-shipping-first) and an amount for subsequent items of the order (product-shipping). Shipping for the order includes the highest ‘product-shipping-first’ and the ‘product-shipping’ amount for all the other items in the order. This I find to be a much better way of approximating shipping.
Thanks,
Mark
Offline
#723 2012-11-07 21:51:10
Re: yab_shop (simple textpattern shop with paypal support)
mericson wrote:
Is “Shipping Costs” in the config a % of purchase, or fixed price per item?
Kind of neither. In the official version, it’s a single, fixed price. In my version you can choose to do that or you can do shipping by weight if you enter a weight table in the prefs instead of a single value. The weight table is quite fugly and it sorely needs a sexy interface to configure it, but for now you can define multiple carriers and price points for varying weights. Here’s a sample weight table:
ukrm1c; UK Royal Mail 1st class; .5--2.1; 1--3.9; 2--6.0; 4--8.4; 6--11.2; 8--13.6; 10--14.7; 20MAX--17.1|
eurm; Europe / EEA 1st class; .3--3.9; .5--4.6; .75--6.2; 1--7.4; 1.5--10; 2MAX--12.9|
euco; Europe / EEA Courier; 4--12.9; 6--15.4; 8--17.8; 10--19.9; 20--22.4; 30--35.4; 50MAX--65.4|
noneu; Outside Europe; .3--6.5; .5--8.4; .75--11.5; 1--13.8; 1.5--18.7; 2MAX--24.25
That gives 4 shipping options depending on weight and destination. The fields in each row are separated by semicolon and are:
- Unique reference for carrier (used internally, entirely up to you)
- Friendly name for the carrier that customers see in the Shipping Options dropdown
- Weight in Kg—Price
- Weight in Kg—Price
- Weight in Kg—Price
- ….
- Pipe character to end carrier definition
As long as the weights are in ascending order, things will work fine. You can also add MAX
to the last weight to indicate that the carrier will not take any freight that exceeds this weight. Some limit the total package weight they’ll carry.
This table is then used by yab_shop to offer customers shipping options based on the total weight of their order. You specify item weights using a custom field, exactly as you do for specifying the custom field for price. if the weight is omitted for an item, it doesn’t count towards the total cart weight (equivalent to free shipping, or a “weightless” item such as a digital download). If the total cart weight exceeds a carrier’s MAX limit, then that carrier is removed from the list automatically at checkout.
Note that the carriers are not graded by destination because the shop does not (and cannot) know the shipping destination until you go to the merchant payment page and put your shipping address in. Therefore it’s up to you to add suitable warnings on-screen to make sure customers choose an appropriate shipping option. If using PayPal you can use smd_ipn to flag inappropriate carrier options and open a dialogue with the customer to resolve the issue prior to shipping the product.
How does the “special shipping” cost work? Does it override the “Shipping Cost” or is it additive to the “Shippping Costs?”
Added to it, on a per-product basis. Useful if you have delicate items that have special handling requirements.
Also, is there a way to do discount on shipping for subsequent items?
Sadly not yet. You can offer free shipping if an order exceeds a total, configurable value, but that is it. There are no price breaks for multiple purchases. The shipping-first thing in Google sounds quite neat.
Essentially, the whole shipping concept is flawed because of the fact the shipping is determined prior to knowing where the goods are being sent. There is no way round this. Also, the rules I built in for shipping by weight and the various other shipping rules are hard-coded into the plugin. On the ToDo list (help!) is a way to modularise the plugin so that shipping can be ripped out of the plugin core and made into a configurable module which can be tailored via the magic of callbacks to your requirements. That’s a tall order, so I’ll say this again: help please! :-) Even if you can’t code, let us know what sort of shipping options make sense or are desirable so I can gather them all together and build the system so it’s extensible to cater for as many varieties of shipping option there are likely to be.
Does that answer your questions?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#724 2012-11-07 23:26:23
Re: yab_shop (simple textpattern shop with paypal support)
Yes, thanks that helps… I understand about the location-based pricing challenges, and Google’s approach I described has been sufficient for me. Actually almost ideal!
This does raise another question… how can I constrain shipping location? I’m OK with a fixed-based pricing if I’m shipping to the lower-48 US states (I’m in US) but what is to prevent someone from ordering in another country, or from Hawaii where my shipping costs would be significantly higher!
Google’s solution is I can pass in information on restricted locations to their cart so it will prevent checkout for those locations.
Offline
#725 2012-11-08 01:00:39
Re: yab_shop (simple textpattern shop with paypal support)
Where do I find your version with the weight-based shipping?
Bloke wrote:
As long as the weights are in ascending order, things will work fine. You can also add
MAX
to the last weight to indicate that the carrier will not take any freight that exceeds this weight. Some limit the total package weight they’ll carry. …. If the total cart weight exceeds a carrier’s MAX limit, then that carrier is removed from the list automatically at checkout.
Have you considered calculating as multiple boxes if the weight exceeds MAX? Anything over max would be calculated as if it is going into an additional box, effectively starting over with the weight tables. For me, with many orders exceeding one box, that would be very useful! However, that of course invites the question of optimization and the “knapsack problem,” but brute force fitting to approximate shipping costs is sufficient.
Offline
#726 2012-11-08 22:51:48
Re: yab_shop (simple textpattern shop with paypal support)
mericson wrote:
Where do I find your version with the weight-based shipping?
Currenty on GitHub but it’s not compiled as a complete .txt plugin there. It’s just the code at the moment. I can throw you a compiled version if you like, or you can just drop the code into a new plugin in ied_plugin_composer and enable it. If you’re starting fresh then it’ll be ok; it’s only upgrades that might lose a few custom strings.
how can I constrain shipping location?
Honestly, I don’t know. The problem with online merchant portals like PayPal (don’t know much about Google Checkout) is as follows:
1) Customer visits checkout page, is happy with their order.
2) They select shipping options, fill out their contact details and click to pay via an online portal (let’s say PayPal).
3) On PayPal’s site they can choose to use debit/credit card or their PayPal account to pay.
4a) If they choose debit/credit card then any details they provided on the yab_shop checkout page are used as the shipping address. Any parts omitted are prompted by PayPal before payment can complete.
4b) If, however, they choose their PayPal account, then once they have logged into PayPal their PayPal shipping details are used. The ones they supplied in the yab_shop checkout form are ignored.
That was why I chose to add a pref that lets you determine which address fields are required. For people who know they are going to use their PayPal address, there’s no point entering the details in yab_shop and then have PayPal discard them: it wastes a customer’s time. If they don’t supply them in yab_shop and decide to use a debit card on PayPal’s site then PayPal will ask for shipping details at that point anyway.
From your (seller) perspective this debacle is a headache. While their PayPal shipping address may indeed be the same as the address they entered in the checkout form, it’s no guarantee. To compound this problem, choice of shipping occurs before any address details are entered in yab_shop. This is partly because you need to supply the merchant with a total price so they know what to bill, yet PayPal allow shipping address to be deferred to their gateway. Once a customer is handed off to the merchant portal, your Textpattern site has no further say in the matter until the transaction is complete. If you don’t add shipping costs prior to handing control to PayPal, they won’t get applied at all; and you don’t want that!
It’s a sticky situation and I don’t know the answer. Forcing people to enter an address in the checkout form — even if we somehow switch the logic around so you have to enter address details before you’re allowed to add shipping — will either put customers off buying at all (it’s extra hassle) or they’ll just enter random crap to bypass the system, knowing that their PayPal details are going to be used anyway. So you either lose the sale or could end up shipping to an unsupported destination.
The only way round it I can think of is to make it damn clear to your customers that you only ship to domestic US and hope they read it :-\
Google’s solution is I can pass in information on restricted locations to their cart so it will prevent checkout for those locations.
If PayPal have such a field in their IPN arsenal then I can’t find it. If you find one that’s suitable, please let me know.
The whole Google Checkout integration is not something I’ve been heavily involved with because I don’t have an account there. The APIs of the merchants do change from time to time and that’s another reason I’m keen to modularise the payment systems. Firstly it’ll allow for support for more than the two built in merchants today, and secondly, we can treat them differently to take advantage of merchant-specific features like this.
If you wouldn’t mind digging out the variables that need setting in Google’s API then by all means I’ll add a pref for it so you can get going now. it seems that maybe you’ll be wanting to offer Google Checkout as sole merchant to take advantage of this feature, right?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#727 2012-12-05 22:40:27
Re: yab_shop (simple textpattern shop with paypal support)
Just a heads-up that if you encounter the following error when submitting an order to PayPal:
The link you have used to enter the PayPal system contains an incorrectly formatted item amount
then the chances are that the price has too many decimal places in it. This usually occurs when a percentage promocode discount is applied and the resulting price is not an integer or fails to neatly drop to 2 decimal places. You can fix this by finding the yab_calc_promo_prices
function and altering the last line from:
return $price;
to:
return round($price, 2);
Not sure if this issue could crop up elsewhere but in the testing so far that fixes it. Applied to the master branch in my version.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#728 2012-12-17 09:34:24
Re: yab_shop (simple textpattern shop with paypal support)
trenc wrote:
I bugfixed my version of Yab Shop and polished the admin UI a little bit for usage with TXP 4.5.0 themes:
On php 5.3 hosting I have this (http://shop.e-gaza.com testing shop in testing mode)
Tag error: <txp:yab_shop_price /> -> Warning: number_format() expects parameter 1 to be double, string given while_parsing_page_form: default, default
What does it mean?
Offline
#729 2013-01-15 04:10:58
- Squirrel Ninja
- New Member
- Registered: 2013-01-15
- Posts: 1
Re: yab_shop (simple textpattern shop with paypal support)
I am making a website with e-commerce capability. I want to use tab_shop plugin which integrates with PayPal. I want to sell mp3 files with a unique generated key for the specific download, after the person has paid goes to PayPal and hooks into to take people to a secure area/send them the download).
Is the right plugin to use?
is it possible to generate a unique key for a secure download?
How the process is implemented it?
Thanks
Offline
#730 2013-02-05 06:02:26
- milosevic
- Member
- From: Madrid, Spain
- Registered: 2005-09-19
- Posts: 390
Re: yab_shop (simple textpattern shop with paypal support)
Hi:
I’m having trouble with yab_shop: I can’t delete products and/or change quantity at the shopping cart page and dont know how to solve it. The page don not return any error feedback, delete and change quantity button simply don’t work.
Could anybody give me any idea, please?
here is the store (yab_shop 0.8.1 & txp 4.5.4)
Thanks a lot
<txp:rocks/>
Offline
#731 2013-02-05 10:25:03
Re: yab_shop (simple textpattern shop with paypal support)
milosevic wrote:
I can’t delete products and/or change quantity at the shopping cart page
99% of the time this is because you have not included:
<txp:yab_shop_cart output="none" />
on the checkout page. If you haven’t done that, try it first and let us know if it fixed the problem. If not, we’ll delve deeper.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
#732 2013-02-05 10:43:18
- milosevic
- Member
- From: Madrid, Spain
- Registered: 2005-09-19
- Posts: 390
Re: yab_shop (simple textpattern shop with paypal support)
Bloke dijo:
99% of the time this is because you have not included:
<txp:yab_shop_cart output="none" />
Touché!!
Now works perfectly. Thanks a lot!
<txp:rocks/>
Offline