Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#811 2014-08-09 17:23:50

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,439
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

NicolasGraph wrote #282682:

Replace return $price; to: return number_format($price,2);

Hmm, well round() worked for me in GBP… perhaps in some currencies it doesn’t? I guess number_format() is the correct way to do it (and may take localisation into account) whereas round() might not, especially if the decimal separator is a European comma instead of a British dot. Probably just stupidity on my part, thanks for the heads up. Will look into fixing it.

I also noticed that the phone number from my checkout form does not appear on the Paypal payment page; the field is empty.

That is odd. No idea at the moment, sorry. I’ll have to do some digging, but I thought I’d tested it in my version.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#812 2014-08-12 10:21:04

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: yab_shop (simple textpattern shop with paypal support)

Hi Bloke,
Just to let you know that I’ve just tried with round() in GBP and british dot, but it doesn’t seem to work anyway on my shop. If you want to test the same order as me it is : 3×1prod. at 12(€or£)=36 -10%discount=32.40. Other users could maybe tell if round() work for them…


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#813 2014-08-14 08:43:40

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: yab_shop (simple textpattern shop with paypal support)

Hi… again.
I didn’t use MLP with Yab_Shop yet, but I read that it works if Yab_shop is installed first.
Does it work with the official version or with the Bloke’s version only and is it possible to have a different shipping cost for each language?
Thx!

Last edited by NicolasGraph (2014-08-14 13:58:31)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#814 2014-08-18 06:41:32

odd-code
New Member
Registered: 2014-08-18
Posts: 3

Re: yab_shop (simple textpattern shop with paypal support)

Can someone out there please help me. I am getting an error message using <txp:yab_shop_price />
Tag error: <txp:yab_shop_price /> -> Warning: number_format() expects parameter 1 to be double, string given while parsing form product_list on page product_template

Offline

#815 2014-08-19 12:02:08

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,316

Re: yab_shop (simple textpattern shop with paypal support)

oddcode, a forum search brings up this info, would it help?

trenc wrote #216481:

You must write prices in decimal. So if a product will costs €12, so write the price as 12,00 or 12.00, then it should work.

One more tip: Subscribe to the topics you’ve posted to. There’s a button at the bottom of each topic page for doing so.


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

Offline

#816 2014-10-09 13:02:09

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: yab_shop (simple textpattern shop with paypal support)

Hi,
I’m trying to make MLP work with yab_shop (Stef’s version) but the website reset the cart at each request.
Does someone know how to make these two plugins work together?
Thx!

Last edited by NicolasGraph (2014-10-09 13:13:55)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#817 2014-10-09 13:16:11

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,439
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

NicolasGraph wrote #284634:

I’m trying to make MLP work with yab_shop but the website reset the cart at each request.

The two plugins don’t work nicely together. At least, not the current ‘official’ versions. The development MLP is more tolerant of sessions and shouldn’t reset things, so you could try that if you wish. If it’s not working, please let me know because it’ll probably be a bug!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#818 2014-10-09 13:34:58

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: yab_shop (simple textpattern shop with paypal support)

Bloke wrote #284635:

The development MLP is more tolerant…

I’m working with these MLP plugins with the Textpattern folder found on your Github.
Aren’t they from the development version?

Last edited by NicolasGraph (2014-10-09 13:40:54)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#819 2014-10-09 13:38:32

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,439
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

NicolasGraph wrote #284636:

Aren’t they from the development version?

Yes. Probably a bug then. So we don’t pollute trenc’s thread, can you please either send me some Page/Form template code that you’re using and some info about your shop setup (custom fields used, for example, maybe some examples of article content) or let me have a login so I can see if I can figure it out? Thanks.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#820 2014-10-09 16:42:54

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: yab_shop (simple textpattern shop with paypal support)

Bloke wrote #284637:

Can you please either send me…

Sent.
Thank you.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#821 2014-10-09 23:41:18

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 12,439
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

Bloke wrote #284637:

Probably a bug then.

Definitely a bug. The problem is to do with the session and the wfCart interaction.

For posterity, the issue is that when MLP first fires up it tries to initiate the session (where the cart is stored) but at that moment, the cart class hasn’t been defined so PHP helpfully assigns it __PHP_Incomplete_Class_Name. When yab_shop loads, it goes to access the cart in the session, finds an incomplete definition of the cart, gets confused, assumes it’s the first time that the page has been run, and creates a brand new cart, thus wiping out whatever was there.

I really don’t know how to get round it. Using cookies worked, but it borked other things. Some people suggest serializing stuff first, but I don’t really understand it yet. If anybody has any helpful hints, I’d love to hear them.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Hire Txp Builders – finely-crafted code, design and Txp

Offline

#822 2014-10-10 12:40:56

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: yab_shop (simple textpattern shop with paypal support)

Bloke wrote #284667:

Definitely a bug. The problem is to do with the session and the wfCart interaction.

Ok thanks to took a look.
Unfortunatly I can’t help.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#823 2015-02-14 17:06:59

MarcoK
Plugin Author
From: Como
Registered: 2006-10-17
Posts: 248
Website

Re: yab_shop (simple textpattern shop with paypal support)

There is a way for add new input field into checkout or I must mod the code?

Offline

#824 2015-02-23 11:43:54

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

There is a way for add new input field into checkout or I must mod the code?

Unfortunately you have to modify the code.


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#825 2015-03-04 19:10:16

kuopassa
Plugin Author
From: Porvoo, Finland
Registered: 2008-12-03
Posts: 243
Website

Re: yab_shop (simple textpattern shop with paypal support)

A feature request: allowing admin to decide if currency symbol is in front of a number or after it.

Offline

Board footer

Powered by FluxBB