Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#373 2009-10-01 15:16:19

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: yab_shop (simple textpattern shop with paypal support)

I would like to add some more textboxes to the checkout form, so as to gather some more information about the customers. Is this possible? If it is, how might I edit the plugin?

I am on a very tight deadline so I do hope someone can answer these questions as soon as possible; in the meantime I’m going to have a look through the plugin code..

Many thanks in advance

Last edited by rathersplendid (2009-10-01 15:21:46)


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#374 2009-10-01 16:04:38

trenc
Plugin Author
From: Malmö
Registered: 2008-02-27
Posts: 572
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

Hi Jonathan,

I am seeing random behaviour when clicking on checkout with the cart. Sometimes the product is wrong, sometimes it says there is nothing in the cart, then suddenly there are 3 items…

try do disable »Send Last-Modified-Header« in Textpattern advanced preferences.

Hi Zander,

I would like to add some more textboxes to the checkout form, so as to gather some more information about the customers. Is this possible? If it is, how might I edit the plugin?

it’s not possible by default. But you can edit the plugin, if you want.
Look for the functions:

yab_shop_build_checkout_form and yab_shop_build_mail_body.

Offline

#375 2009-10-01 16:42:54

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: yab_shop (simple textpattern shop with paypal support)

@rathersplendid: If you edit the plugin and the checkout form is based on zem_contact_reborn (is it?), then you could use the postmaster plugin and just add some input fields with name=“postmaster_hook” Not sure if it works though…

Offline

#376 2009-10-01 16:43:30

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: yab_shop (simple textpattern shop with paypal support)

trenc wrote:
it’s not possible by default. But you can edit the plugin, if you want.
Look for the functions:
yab_shop_build_checkout_form and yab_shop_build_mail_body.

I will have a go now and hopefully get it working. Just one more question though? If I add more fields, where does the information get sent? to Paypal or just to the email that I provided?

many thanks for you help and for the plugin, its great!


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#377 2009-10-01 18:20:47

trenc
Plugin Author
From: Malmö
Registered: 2008-02-27
Posts: 572
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

I will have a go now and hopefully get it working. Just one more question though? If I add more fields, where does the information get sent? to Paypal or just to the email that I provided?

As you wish. The informations, that will be sent to Paypal are hardcoded and read from the POSTed checkout form and the shopping cart session.

If you add some form fields in yab_shop_build_checkout_form, you can grab there then in yab_shop_build_mail_body to send by email.

Offline

#378 2009-10-02 14:19:43

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: yab_shop (simple textpattern shop with paypal support)

I’ve added the extra fields in the form successfully but I cannot find out out if it truly worked because I can’t get the certificates working; I keep getting this error:

Paypal public certificate is not readable! Please check permissions, names and paths!

Should the absolute address begin with http://www... or is it more like /home/1234/domains/example.com/html?

Also what permissions should the certificates be? 755?

[UPDATE] After a quite a bit of trial and error, it now works. I am using permissions, 755, I assume thats right? [The problem below still stands]

P.S. I also cannot get the ‘Change Qty’ or ‘x’ button to work in the checkout, why wold this be? Is there something that I should’ve done to set it up?

Thanks guys

Last edited by rathersplendid (2009-10-02 15:40:57)


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#379 2009-10-02 17:44:35

trenc
Plugin Author
From: Malmö
Registered: 2008-02-27
Posts: 572
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

P.S. I also cannot get the ‘Change Qty’ or ‘x’ button to work in the checkout, why wold this be? Is there something that I should’ve done to set it up?

Yes, place <txp:yab_shop_cart output="none" /> in the checkout page!

Offline

#380 2009-10-02 18:43:36

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: yab_shop (simple textpattern shop with paypal support)

Thanks, it works now.


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#381 2009-10-05 11:51:45

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: yab_shop (simple textpattern shop with paypal support)

Hi guys,

I’ve got another issue. I have been editing the checkout form, with your help, and was under the impression that these new details would be sent when the order was processed. My client needed to get some extra info from each purchaser when they bought the product.

I am solely using Paypal for this shop and never received any other emails, apart from the Paypal official emails, concerning the order (I only realised this after the fact, but a quick search revealed this, much to my dismay). Is there any way to send this email to buyers using Paypal even though they might not have actually bought the item after proceeding with the purchase? (I’ve been going through the forum pages but haven’t seen if this question has been answered)

Last edited by rathersplendid (2009-10-05 21:15:54)


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#382 2009-10-06 08:40:28

trenc
Plugin Author
From: Malmö
Registered: 2008-02-27
Posts: 572
Website GitHub

Re: yab_shop (simple textpattern shop with paypal support)

Hi Zander,

go in the plugin part yab_shop core and look for the function yab_shop_checkout($atts). Should be begin around line 404 in the plugin code. In line 464 and 499 are the encrypted paypal stuff.

$checkout_form = yab_shop_build_paypal_encrypted_form($cart);

On line 466 you can replace the

$cart->empty_cart();

with

if (yab_shop_shop_mail(yab_shop_config('admin_mail'), yab_shop_lang('admin_mail_subject'), yab_shop_build_mail_body($cart, $ps_order)))
{
  $cart->empty_cart();
}

So the mail admin mail will be sent too by paypal payment.

For the buyers, customers and admin mail replace the $cart->empty_cart(); on line 501 width:

if (yab_shop_shop_mail(yab_shop_config('admin_mail'), yab_shop_lang('admin_mail_subject'), yab_shop_build_mail_body($cart, $ps_order)))
{
  if (yab_shop_shop_mail($ps_order['email'], yab_shop_lang('affirmation_mail_subject'), yab_shop_build_mail_body($cart, $ps_order, '1')))
  {
    $cart->empty_cart();
  }
}

So the buyers and the shop owner will always receive the mail by paypal payment.

trenc

Last edited by trenc (2009-10-06 08:42:31)

Offline

#383 2009-10-06 09:17:53

rathersplendid
Plugin Author
From: London
Registered: 2008-05-02
Posts: 163
Website

Re: yab_shop (simple textpattern shop with paypal support)

Thanks mate, you’re a legend!


Admin Themes Prometheus | Stung | <txp:coder/
My Portfolio | ɹǝpuɐz.com | @MrMartineau
<txp:coder /> – Convert your designs into Textpattern-based websites
jQuery Style | @jquerystyle

Offline

#384 2009-12-11 13:38:44

skattila
New Member
From: Germany
Registered: 2009-12-11
Posts: 1

Re: yab_shop (simple textpattern shop with paypal support)

hello,

is it possible to insert onchange links in the dropdown menue for e.g. “color”? where can i find it in the sourcefile?
i want to automatically change the photo of the product if the customer select the color in the dropdown box.
Or is there any other workaround?

skattila

Offline

Board footer

Powered by FluxBB