Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#325 2009-06-07 19:15:56

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: yab_shop (simple textpattern shop with paypal support)

Trenc —

My site with your shopping cart is almost complete. Every feature upgrade has been awesome, and we’re now in the final testing phase. However, I am running into one significant bug that I can’t figure out. Everything goes through the PayPal process perfectly, and the purchaser receives their order confirmation e-mail, but I am not gettingreceiving any e-mails to the admin address for the orders. This is my set-up:

‘admin_mail’ => ‘graphicpush@gmail.com’,
‘order_affirmation_mail’ => ‘1’

Am I missing something? I also changed the Send “Last-Modified” header? to “no” but that did not help (not that I thought it would). Any ideas?

Also, another question. At the very end of the last PayPal screen, there is a button that says “Return to X” which goes to my thank you page. However, what is the variable that controls the name in that button’s label? Is the text after “Return to …” the name of the actual PayPal account holder?

Last edited by kevinpotts (2009-06-07 19:18:43)


Kevin
(graphicpush)

Offline

#326 2009-06-08 07:04:19

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: yab_shop (simple textpattern shop with paypal support)

Download links in the first post are broken :(

Offline

#327 2009-06-08 07:27:49

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: yab_shop (simple textpattern shop with paypal support)

FireFusion wrote:

Download links in the first post are broken :(

Untill trenc fixes it: http://www.yablo.de/files/yab_shop_v0.7.1.zip

Link directly to the file with out Textpattern’s clean urls.

Last edited by Gocom (2009-06-08 07:29:46)

Offline

#328 2009-06-08 09:23:19

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

Re: yab_shop (simple textpattern shop with paypal support)

Hi Kevin,

My site with your shopping cart is almost complete. Every feature upgrade has been awesome, and we’re now in the final testing phase. However, I am running into one significant bug that I can’t figure out. Everything goes through the PayPal process perfectly, and the purchaser receives their order confirmation e-mail, but I am not gettingreceiving any e-mails to the admin address for the orders. This is my set-up:

‘admin_mail’ => ‘graphicpush@gmail.com’,
‘order_affirmation_mail’ => ‘1’

Am I missing something? I also changed the Send “Last-Modified” header? to “no” but that did not help (not that I thought it would). Any ideas?

no, you don’t miss anything. An email will not be sent if the payment methods are Google checkout or Paypal checkout for the following reasons: If an customer is on the third party payment page (say Paypal) and he decide not to finish the order so I have no feedback from Paypal this time about the cancel of the order. So it would be logical Paypal would manage the customer and admin order mails. But Paypal does not. :(

But when I will implement an IPN (Instant Payment Notification) yab_shop will have a Paypal feedback of the status of the current order (cancel, finished etc.) and then yab_shop is able to send the mails. But this implenetation will takes a while.

Also, another question. At the very end of the last PayPal screen, there is a button that says “Return to X” which goes to my thank you page. However, what is the variable that controls the name in that button’s label? Is the text after “Return to …” the name of the actual PayPal account holder?

I’m candid: I’ve no idea. But I think it’s the name of Paypal account (or it’s a business account the name of the company).

Offline

#329 2009-06-08 09:28:15

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

Re: yab_shop (simple textpattern shop with paypal support)

Download links in the first post are broken :(

Untill trenc fixes it: http://www.yablo.de/files/yab_shop_v0.7.1.zip

Link directly to the file with out Textpattern’s clean urls.

Yeah, thanks Jukka.
My hoster decided to move my hosting to another server with another structure so the paths has changed. :/
But I fixed it now. Maybe some other things are broken, but I can check this not before tomorrow.

Offline

#330 2009-06-08 13:44:00

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: yab_shop (simple textpattern shop with paypal support)

trenc wrote:

no, you don’t miss anything. An email will not be sent if the payment methods are Google checkout or Paypal checkout for the following reasons: If an customer is on the third party payment page (say Paypal) and he decide not to finish the order so I have no feedback from Paypal this time about the cancel of the order. So it would be logical Paypal would manage the customer and admin order mails. But Paypal does not. :(

OK, I understand. So is there another way the store manager could be notified of a purchase, or do they have to monitor PayPal manually? Seems kind of odd. Could you add a feature to fire off an e-mail to the admin saying something to the effect of “someone just clicked submit, better go check paypal to see if the purchase went through even though it might not have”. Because this particular store is just not going to be used that much, it is not realistic for PayPal to be constantly monitored.

But when I will implement an IPN (Instant Payment Notification) yab_shop will have a Paypal feedback of the status of the current order (cancel, finished etc.) and then yab_shop is able to send the mails. But this implenetation will takes a while.

This sounds perfect. How much money do you need? ;)


Kevin
(graphicpush)

Offline

#331 2009-06-08 16:38:41

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

Re: yab_shop (simple textpattern shop with paypal support)

trenc

Many thanks for the modded yab_shop_special_promo(). I originally had properties governing the different product models but I’ve ditched that and gone with one article per product. Keeps things simpler and allows me to go a stage further with your mod. For info:

1) Each product employs an optional custom field called Discount

2) If a discount structure is valid for a product, sed_pcf sets up discounts per tier, e.g. Silver(d='10')|Gold(d='15')|Platinum(d='20')

3) If we are viewing an item in the shop, then I do the logic:

<txp:smd_switch item='<txp:ign_user_info type="name" />'>

<txp:smd_case value="client1" />
<txp:smd_case value="client2" />
<txp:smd_case value="client4">
<txp:variable name="client_discount_name" value="Silver" />
</txp:smd_case>

<txp:smd_case value="client3">
<txp:variable name="client_discount_name" value="Gold" />
</txp:smd_case>

</txp:smd_switch>

<txp:variable name="client_discount" value='<txp:sed_pcf_get_value custom="discount" section=''<txp:variable name="client_discount_name" />'' variable="d" default="0" />' />

So that sets up a client_discount_name that I can refer to and display on-screen. It also matches one of the sections in sed_pcf so I can read out the discount that applies to this product, depending on the client’s tier.

4) After that, a call to <txp:yab_special_promo discount='<txp:variable name="client_discount" />' /> is all that is required to register the discount for the current product. Upon visiting the checkout, the per-product discounts for that client’s products in their cart are automatically applied!

I do various bits of trickery as I mentioned in an earlier post to check if the value of the discount is non-zero so I can display things like “your partner discount of N% will be applied at the checkout”, and so on.

5) The session clearing code was simply this in the end, just prior to the call to <txp:ign_show_login /> inside the <txp:else /> part of the <txp:ign_if_logged_in /> that surrounds the entire client area:

<txp:php>
	yab_shop_start_session();
	$cart =& $_SESSION['wfcart'];
	if (!is_object($cart)) {
		$cart = new wfCart();
	}
	$cart->empty_cart();
</txp:php>

Thus the cart is emptied on logout. Absolutely awesome. Thanks a million, trenc.

Last edited by Bloke (2009-06-08 16:40:30)


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

#332 2009-06-15 18:57:49

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: yab_shop (simple textpattern shop with paypal support)

OK, one more thing. If I assign a custom shipping cost for each item, it stays the same no matter what the quantity is. So if an item costs 5, and shipping is 2, and I want to purchase 20 of them, the final total is 102.

Right now the calculation is (item cost X quantity) + shipping, where it should be (item cost + shipping) * quantity

Is this intentional?


Kevin
(graphicpush)

Offline

#333 2009-06-16 08:47:30

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

Re: yab_shop (simple textpattern shop with paypal support)

Hi Kevin,

yes it’s intentional. The special (custom) shipping costs are assigned to items/products and not to item quantities.

Offline

#334 2009-06-16 13:31:23

kevinpotts
Member
From: Ghost Coast
Registered: 2004-12-07
Posts: 370

Re: yab_shop (simple textpattern shop with paypal support)

trenc wrote:

yes it’s intentional. The special (custom) shipping costs are assigned to items/products and not to item quantities.

I guess I don’t understand the logic behind this. If an item costs $2 to ship, and they order 100, how can shipping remain $2? I love having the custom shipping field, but at this point I have to hope that someone doesn’t order a lot or they are going to get a great deal on shipping. :(

On a related note, is there any way to implement shipping rate calculators?


Kevin
(graphicpush)

Offline

#335 2009-07-07 15:28:57

mfos
Member
Registered: 2008-12-11
Posts: 34

Re: yab_shop (simple textpattern shop with paypal support)

Great Plugin.
Have a problem – The basket and checkout doesn’t seem to be working correctly.
I added several items to the basket and sometimes it doesn’t update properly when navigating to othe pages etc. I’ve even tried to delete an item in the checkout, says i have deleted the item but if i click on proceed to checkout again, the item appears again in the checkout table.

Problem with page caching? If so how do I stop it?

The basket is put into my ‘header’ form. Shouldn’t be causing an issue there surely.

Any ideas?

Cheers
Mike

Offline

#336 2009-07-09 10:55:28

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

Re: yab_shop (simple textpattern shop with paypal support)

Hi Kevin,

I guess I don’t understand the logic behind this. If an item costs $2 to ship, and they order 100, how can shipping remain $2? I love having the custom shipping field, but at this point I have to hope that someone doesn’t order a lot or they are going to get a great deal on shipping. :(

The logic should be that shipping a bicycle is more expensive than shipping a pen. But shipping 1000 pens should be more or less the same costs as shippping one pen. By shipping 1000 bicycles you should be able of making enough money to ship these free, even if you have to order an extra large truck for shipping.

Btw. I’ve never seen a shop where the shipping costs increase by the amount of items. This would be weird (to me).

On a related note, is there any way to implement shipping rate calculators?

What exactly do you have in mind?

Offline

Board footer

Powered by FluxBB