Zen Cart Logo
Forums / All Other Contributions/Addons / Paying by Instalments - Adding Payment Link to Account_History_Info Page

Paying by Instalments - Adding Payment Link to Account_History_Info Page

Views: 3,776

Results 1 to 20 of 37
18 Mar 2011, 10:02 PM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Paying by Instalments - Adding Payment Link to Account_History_Info Page

I use a Pay by Instalments mod on https://www.silkblooms.co.uk that lets people pay a deposit on orders over £100.00 and then pay the rest when they can.

It's all very informal and it works really well. The customers love it as it helps them spread the cost of their wedding flowers, often over a year or more. I am just wondering if anyone has any good ideas on how to make it easier for me, logistically.

At present, I have a standard instructions email that tells the customer just to email us when they'd like to pay another instalment. Just to tell us how much they'd like to pay and what method they'd like to use. We then manually invoice them via PayPal, Google Checkout, or our Credit Card VT. As you can imagine, this is becoming quite time consuming.

I'm wondering if there would be a way to add a "Pay Instalment" lilnk to their http://www.silkblooms.co.uk/index.php?main_page=account_history_info&order_id=XXXX page? That way, when the customer is logged in and viewing their order comments, they'll see the link that allows them to make a payment themselves, without having to email us.

I don't really know where to start with this one so ANY ideas or suggestions would be very welcome.

19 Mar 2011, 8:15 AM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

You might consider this **HERE**

19 Mar 2011, 8:20 AM
#3
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

An interesting solution! Thank you Kobra, I didn't think of a simple link to a custom product that's been set up purely to allow payment of instalments. Gret idea!!

I wonder though, insted of the radio buttons, would there be a way to allow the customer to input an amount?

19 Mar 2011, 8:25 AM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

Not right off and have it transfer that amount to the cart

19 Mar 2011, 8:39 AM
#5
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

Not sue what you mean?

19 Mar 2011, 8:50 AM
#6
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

You can add a text box but the value entered will not become the item price

19 Mar 2011, 8:58 AM
#7
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

I'm presuming there's no way for a customer to input their own value to an item price then? I certanily can't think of a way to do it. A product with an open price. Interesting.

19 Mar 2011, 9:02 AM
#8
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

I wonder if there's a way to do it by manipulating the price by attribute functions. Seems a bit long winded when you think about it as just typing an amount would seem the most user friendly way for a customer to pay an instalment. Just a thought.

19 Mar 2011, 9:03 AM
#9
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

About the only way that I can think to do this would be like this **HERE**

19 Mar 2011, 9:14 AM
#10
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

Fantastic idea, yet again! I'm thinking of a custom product now with some product specific CSS. If I create a product called, "Instlament" and price the product at £1.00, then I could change the add to cart so that instead of reading "Quantity" is read "Enter the Amount you'd like to pay in £GBP".

What if they entered 150.50 though? Zen Cart can't handle half of a product. Try it and you get, "The quantity added to your cart has been adjusted. The item you wanted is not available in fractional quantities. The quantity of item: X, has been changed from: 150.5 to 151

When it says, "The item you wanted is not available in fractional quantities", I'm assuming that there is a way to create items that are?

19 Mar 2011, 9:28 AM
#11
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

Decide upon the minimum increment and use Product Qty Units: in the product setup

See the link again

19 Mar 2011, 9:38 AM
#12
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

I just set up a trial product and used Product Qty Units: 0.01 (one penny) but it appears not to be working for me:

http://www.silkblooms.co.uk/index.php?main_page=product_info&products_id=1652

Still says, "The item you wanted is not available in fractional quantities"

19 Mar 2011, 9:44 AM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

Check your setting

admin > config > stock > Product Quantity Decimals

19 Mar 2011, 10:00 AM
#14
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

Yup, that certainly did the trick. Fantastic!!

Just one or two things that stop me implementing this. I wonder if you can help with this too, maybe it's an Admin setting I've never noticed but here's a screenshot of the INSTALMENT product:

http://www.silkblooms.co.uk/images/prototypes/Capture.JPG

Niggle (1): As you can see, I've selected the 'Yes, Always Free Shipping' radio button. However, it still adds on shipping at the checkout page. Is this an Admin Setting?
Niggle (2): Screenhot of product page: http://www.silkblooms.co.uk/images/prototypes/Capture2.JPG - The text that says, "Min: 0.01 Units: 0.01" isn't controlled by CSS, so I can't just use a "display:none;" to get rid of it. Is there a setting that switches it off as it's not needed.

19 Mar 2011, 1:18 PM
#15
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

I'm getting there with this. It's doing what it's supposed to now:

http://www.silkblooms.co.uk/index.php?main_page=product_info&products_id=1652

Just a few more little niggles:

  1. The 'Add to Cart' button. Does anyone know if it's possible to have different button for a specific product? I'd rather it said, "Pay Now".
  2. Probably not possible but is there any way to give the customer a different checkout_success mesasge when they purchase this product, as opposed to our standard products?
19 Mar 2011, 11:46 PM
#16
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

You can hardcode in the logic on the tpl_product_info_display to show a different button and the same for the success page. For instance, and this is from 1.3.7.1 so it may be different in another version but you'll get the idea:
instead of this

$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="2" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
```do this:

```php
if ($products_model == 'your_installment_model') {
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="2" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_INSTALLMENT_PAY_NOW, BUTTON_INSTALLMENT_PAY_NOW_ALT);
} else {
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="2" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}
```The same goes for the checkout success page, just add that little bit of logic to alter what the template displays.

You can get fancier and add a setting in the admin to enter multiple products models or IDs, using a constant in the above snippet to avoid hardcoding. If that is something that you would want let me know and I will put together the necessary code samples.
20 Mar 2011, 12:14 AM
#17
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

Hey, thanks for this, absolutely brilliant thinking!

I'd be able to implement this if I knew one thing:

  • $products_model == 'your_installment_model'

What do you mean by* 'your_installment_model'*?

Could you fill in the blanks for me on what to put there, based on the URL:

http://www.silkblooms.co.uk/index.php?main_page=product_info&products_id=1652

??

The product will always be the same URL. But when you say, 'model' do you mean Products Model: from the create new product area? i.e., in this case I've used a model number as, 'Pay an Instalment'.

Help me understand :)

20 Mar 2011, 4:14 AM
#18
lankeeyankee avatar

lankeeyankee

Totally Zenned

Join Date:
Jan 2007
Posts:
1,514
Plugin Contributions:
1

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

Sorry, I meant "your installment products model number", the zen cart model number for this product. Since all of the product details are already being called when _tpl_product_inf_display_default.php is loaded it's easy to use any product parameter such as model number. So using my code snippet, it's the Product Model (from the create new product area).

You can use this same logic to display a different content on the tpl_checkout_success.php file, you can create a whole new and different page if you want.

20 Mar 2011, 10:09 AM
#19
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

I can see how this should work, but I'm having trouble implementing. Perhaps you could look at the proceedure I've used and see if you can notice what I've done wrong:

includes/templates/CUSTOM/templates/tpl_product_info_display.php REPLACED THIS:

    $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);

WITH THIS:

if ($products_model == '1652') {
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="2" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_INSTALLMENT_PAY_NOW, BUTTON_INSTALLMENT_PAY_NOW_ALT);

} else {
	
$the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="2" />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
}  

/includes/languages/english/button_names.php ADDED THIS:

define('BUTTON_INSTALLMENT_PAY_NOW', 'button_installment_pay_now.jpg');
define('BUTTON_INSTALLMENT_PAY_NOW_ALT', 'Pay an Instalment');

UPLOADED THIS:
http://www.silkblooms.co.uk/includes/templates/freetemplate2/buttons/english/button_installment_pay_now.jpg

It should work, right? It definitely did something as it changed the spacing around the add to cart button but it definitely didn't do what it's supposed to. Can you see what I've missed? It still shows the image for BUTTON_IMAGE_IN_CART

20 Mar 2011, 10:26 AM
#20
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Paying by Instalments - Adding Payment Link to Account_History_Info Page

I changed my tpl_product_info_display.php to see if it was a problem with the button creation. It's not. I changed BUTTON_INSTALLMENT_PAY_NOW to BUTTON_IMAGE_PREVIOUS just to see if it's use the 'Previous' button. It didn't.

Hopefully that'll help you pinpoint the error?