Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#697 2012-06-26 15:51:00

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: yab_shop (simple textpattern shop with paypal support)

@CeBe – sorry for the brain scatter (and your clarification): The web server runs LiteSpeed.
My coding skills are limited and improvised (though curious) – so any skilled insight helps. Thanx again.


A hole turned upside down is a dome, when there’s also gravity.

Offline

#698 2012-06-26 15:54:08

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: yab_shop (simple textpattern shop with paypal support)

@ Bloke.
Thank you very much for the offer, i sent an email just now. Happy to provide as much feedback as possible.
Janek


A hole turned upside down is a dome, when there’s also gravity.

Offline

#699 2012-06-26 23:16:49

CeBe
Plugin Author
From: Caen - Fr
Registered: 2010-06-25
Posts: 345
Website

Re: yab_shop (simple textpattern shop with paypal support)

jayrope a écrit:

My coding skills are limited and improvised (though curious)

That’s a pretty good way to learn :)

Offline

#700 2012-06-27 18:33:29

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: yab_shop (simple textpattern shop with paypal support)

Stef, thank you much for the code.

I wonder how to implement a very modular setup into yab_shop and would love to contribute, despite minor coding skills.

What i imagine is, that

- the cart display as well as the checkout process could be much more customizable in detail
example: cart displays any of the following in any user desired combination with separate stylable markup per entry:

item_name,
item_description
item_quantity (edible OR just display, respecting number in stock, see below),
item_delete,
item_price,
item_discount,
item_tax (another custom_field, if edible per item),

items_price_summary,
items_price_total,

client_address (edible OR just display),
client_contact (edible OR just display),
client_payment_option (edible OR just display),

cart_delete

(i probably forgot some)

That way we could customize anything between the smallest sidebar cart display and a full checkout process out of the same set of tags. Furthermore

- a simple form of stock keeping could be implemented, using a custom field containing the number of available items, counting down, when item got sold
- item could be reserved (automatically putting an “x” in custom_field “reserved”) or item article receiving a state change to “Pending” or whatever desired, when last item got sold, or upon manual editing of article.

I hope that wasn’t too much in one go, and how can i help to implement this?

A simple example on just one of the tags would help, i think i could go from there, even if developing just a companion plugin.

I sent this to your email, too. Please excuse subsequent data overflow :)

Last edited by jayrope (2012-06-27 18:44:03)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#701 2012-06-27 20:51:00

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,269
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

jayrope wrote:

a simple form of stock keeping could be implemented, using a custom field containing the number of available items, counting down, when item got sold

In addition to what I sent you via e-mail about the cart and checkout tags being containers (err, I think… haven’t checked) what you are after here is smd_ipn. It is a “listener” for completed PayPal transactions and allows you to run any custom code / tags of your choosing to do anything you like, e.g. update stock, store transactions, send off e-mail confirmations, deliver digital downloads, send off an smd_access_key to protected content. If you can dream it, you can do it. Plugin available on request at the moment, primarily because I haven’t got round to releasing it officially.

item could be reserved (automatically putting an “x” in custom_field “reserved”) or item article receiving a state change to “Pending” or whatever desired, when last item got sold, or upon manual editing of article.

That’s more tricky but I think the new callbacks would help you here as you could intercept the ‘add to cart’ action and change it to suit your needs.

Last edited by Bloke (2012-06-27 20:51:34)


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

Online

#702 2012-06-28 14:49:24

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: yab_shop (simple textpattern shop with paypal support)

Bloke wrote:

the cart and checkout tags being containers (err, I think… haven’t checked)

Apparently there isn’t enough customisable tags available inside those containers.

<txp:yab_shop_cart>
<txp:yab_shop_cart_item>
<txp:yab_shop_cart_item_name /> (<txp:yab_shop_cart_item_quantity />x = <txp:yab_shop_cart_item_price />
<txp:yab_shop_cart_item_delete />
</txp:yab_shop_cart_item>
<txp:yab_shop_cart_subtotal />
<txp:yab_shop_link_to_checkout />
</txp:yab_shop_cart>

is something i am thinking of. I managed to modify <txp:yab_shop_cart> so that i could do something similar to
<txp:yab_shop_cart_items_j showquantity="0" showquantity="1" showsubtotal="0" />

However, that approach doesn’t include editing the cart, which would be necessary put an item_delete button behind each item listed.
This feature only shows up in the checkout process.
Which gets me back to the modular construction i was trying to imagine in my earlier post.

This modular construction seems impossible without looking at the complete checkout process first for the purpose of merging the ability to ONLY display cart (as in the current <txp:yab_shop_cart />) but as well checkout data with the editing capabilities we currently only have in the checkout part, such as item_delete or item_change_quantity – or checkout_add_address etc.

Taking it all apart, putting everything possible into plugin tags individually accessible, provide full display and editing capability to the PHP-unsavy textpattern programmer.

How does that sound? What did i miss, which already provides features in that direction? smd_ipn?

Last edited by jayrope (2012-06-28 15:58:06)


A hole turned upside down is a dome, when there’s also gravity.

Offline

#703 2012-07-26 07:13:33

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

Re: yab_shop (simple textpattern shop with paypal support)

Hi folks.

I’ve got some problems with accented characters send to Paypal website. Any idea how to correct it?

Thanks by advance.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#704 2012-07-30 13:29:09

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

Re: yab_shop (simple textpattern shop with paypal support)

… Really, no ideas ?


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#705 2012-07-30 17:13:21

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: yab_shop (simple textpattern shop with paypal support)

Hi Patrick.
Have you checked PayPal documentation for hints?
You could try processing the strings with ut8_encode (at least, I fixed an issue with accented and special characters not being posted to Twitter via its API). rah_function plugin could be helpful for doing that.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#706 2012-07-31 06:03:32

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

Re: yab_shop (simple textpattern shop with paypal support)

Hi Julián. Tks for your reply ;)

I’d tried lot of things directly into the source (even ut8_encode PHP function): none works as expected. I’m going to try again and if I can got a result I project to convert strings in uppercases.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#707 2012-07-31 08:01:08

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,599
GitHub Twitter

Re: yab_shop (simple textpattern shop with paypal support)

Ok. Finally I’d made this changes (file: yab_shop_core) into the yab_shop_build_paypal_form($cart) function:

$products .= hInput('item_name_'.$i, iconv('utf-8', 'ascii//TRANSLIT', $item['name'])).n.

All is (pretty) perfect now: characters are displayed without any accents.


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#708 2012-08-11 12:08:42

palmkvist
New Member
Registered: 2012-08-09
Posts: 2

Re: yab_shop (simple textpattern shop with paypal support)

Is there a way to swith the order of the sum and the currency sign?
Swedish currency is written “ 150kr or 150,00kr “

Offline

Board footer

Powered by FluxBB