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 21 to 37 of 37
20 Mar 2011, 10:31 AM
#21
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

Another clue, shadowed out in my page code in FireBug I can see this:

<input type="hidden" value="1652" name="products_id">

Then, directly below and not shadowed out I can see this:

<input type="image" title=" Add to Cart " alt="Add to Cart" src="includes/templates/freetemplate2/buttons/english/button_in_cart.jpg">
20 Mar 2011, 10:53 AM
#22
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

OK, figured it out. It shouldn't be:

if ($products_model == '1652') {

It should be:

if ($products_id == '1652') {

20 Mar 2011, 11:47 AM
#23
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

OK, so that part of it's solved using if ($products_id == '1652') { on the tpl_product_info_display.php page where the URL shows the product ID so the logic is easy.

However, how on earth would you apply the same principle to the checkout_succes message? Could you still use the product ID, even though the URL would have no mention of this? I'm struggling to figure that out.

20 Mar 2011, 4:19 PM
#24
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

limelites:

OK, figured it out. It shouldn't be:

if ($products_model == '1652') {

It should be:

if ($products_id == '1652') {

Glad you got that figured out, sorry for the lack of clarification. The $products_model is what I used before but as you can see any of the product info can be used since it's all being called by the page.

I will have to go back through the mental memory banks and code to remember how I did it for the checkout success page. The URL has nothing to do with this. The product info is still being called for the product notifications, the underlying logic for all pages is in includes>modules>pages>(page name)>header_php.php. In the tpl_checkout_success_default.php try using

if ($products->fields['products_id'] == '1652') { your custom code } else { regular code}
``` perhaps right under the main <div class=centerColumn"> or whatever yours is called. Let me know if that works or not.
20 Mar 2011, 4:29 PM
#25
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

By the way, I checked out the product page and see that it's come along nicely. With a little extra coding you can have the customer's balance displayed on the page once they are logged in, and if you use Keep Cart (which in my opinion everyone should use and it should be a part of the core files) you could probably show the balance regardless of whether or not they are logged in after they have logged in once, with a little modification or perhaps cloning of the module.

20 Mar 2011, 5:00 PM
#26
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

lankeeyankee:

By the way, I checked out the product page and see that it's come along nicely. With a little extra coding you can have the customer's balance displayed on the page once they are logged in, and if you use Keep Cart (which in my opinion everyone should use and it should be a part of the core files) you could probably show the balance regardless of whether or not they are logged in after they have logged in once, with a little modification or perhaps cloning of the module.

Yeah, I do keep cart as it's invaluable.

I will try the code above, to see if I can create a product specific checkout success page and I'll update with the results.

Your comments above have reminded me of a couple of little niggles. The main one being the customers balance. At the moment, when they click on the "My Account" link, it just takes them to a list of their orders, including instalment orders logged by Google checkout. These just show their order totals and they have to click on the "VIEW" tab next to the one that says 'OUTSTANDING BALANCE' and read the comments to see what tehy owe. Their balance is entered manually into the order comments you see.

Is there a better way of doing this? I''m all ears!

20 Mar 2011, 5:07 PM
#27
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

If you're using a similar checkout success with alternate pages then perhaps you could post a copy of your tpl_checkout_success_default.php file? I just looked at mines and it's pretty complicated :)

22 Mar 2011, 2:13 PM
#28
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

I've looked through all of my old backup files but the ones with this modification must be on the old computer which died. I did it for a promotional period and then changed it to a regular modified success page (without the if else conditional statement).

But it should work without a problem.

Regarding the new code, I suggest copying the current code into the new section and then alter it instead of writing it from scratch. Depending on what you want it to look like and say of course. What do you want it to look like and say? Perhaps provide a screenshot of the current page and let me know what you are trying to achieve and I can help you figure it out. Depending on what you want, you may or may not have to make some customizations to the header_php file, too.

Regarding displaying the balance, that can be done, too. I will have to look into it or perhaps another experienced zenner reading this thread will know it and be able to chime in. The beautiful thing about zen cart, apart from this incredibly helpful forum of course, is that ANYTHING is possible with some customization. I think we might need to make a new product type by cloning and tweaking an existing one, I'll have to give it some thought and do some poking around and tinkering.

Perhaps when this is all done it should be wrapped up into a community contribution and added to the downloads. I could see this being a valuable feature for many other users.

22 Mar 2011, 4:16 PM
#29
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

Thanks for getting back to me. My present checkout success page looks like this:

Just a normal page, nothing fancy, but worded as though someone's just purchased a product, not as though they'd paid an instalment.

I basically want to use different text, nothing fancy, just text that thanks them for their instalment and informs them that their balance will be updated shortly.

I don't know how you'd update the balance automatically, that's way outside the scope of my skills but if you could come up with a solution to that then it'd definitely be well worth adding to the contributions area.

23 Mar 2011, 11:27 AM
#30
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,017
Plugin Contributions:
2

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

lankeeyankee:

Perhaps when this is all done it should be wrapped up into a community contribution and added to the downloads. I could see this being a valuable feature for many other users.

Very useful indeed for higher priced items, such as art, or where payment for services is staged. In these cases, payment facility should include a payment regime eg number of payments at required percentages.

For art, a special button similar to the half-sticker used by galleries would be required, which allows others to purchase instead if the initial buyer delays or stalls payment.

Bookmarked this thread.

23 Mar 2011, 1:05 PM
#31
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

limelites:

Thanks for getting back to me. My present checkout success page looks like this:

Just a normal page, nothing fancy, but worded as though someone's just purchased a product, not as though they'd paid an instalment.

I basically want to use different text, nothing fancy, just text that thanks them for their instalment and informs them that their balance will be updated shortly.

I don't know how you'd update the balance automatically, that's way outside the scope of my skills but if you could come up with a solution to that then it'd definitely be well worth adding to the contributions area.

This is all pretty simple to change. I believe that some of it is in a define page section and the rest in the language files. Basically, look at the tpl file and figure out what parts you do not want in the customized page, it's all pretty straightforward.

If it helps, have the checkout success page open in a browser so you can see what the different section of codes look like on the rendered page. It looks like you have product notifications off, do you want the gift certificate section displayed?, etc.

If everything else is turned off then it's really easy to hardcode some text into the template or if you want to get more proper you can add some new defines to the language file. Just do something like this(this is taken from the default tpl_checkout_success_default.php in 1.3.9h):

<?php
/**
 * Page Template
 *
 * Loaded automatically by index.php?main_page=checkout_success.<br />
 * Displays confirmation details after order has been successfully processed.
 *
 * @package templateSystem
 * @copyright Copyright 2003-2010 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_checkout_success_default.php 16313 2010-05-22 08:15:39Z wilt $
 */
?>
<div class="centerColumn" id="checkoutSuccess">
<?php if ($products->fields['products_id'] == '1652') { ?>
<h1 id="checkoutSuccessHeading"><?php echo "Your new heading title"; ?></h1>
<!--(if you want the order number displayed keep the next <div> section, if not delete it) -->
<div id="checkoutSuccessOrderNumber"><?php echo TEXT_YOUR_ORDER_NUMBER . $zv_orders_id; ?></div>

<div id="checkoutSuccessMainContent" class="content">
<!--Your formatted html message goes here.  -->
</div>

<!--bof logoff-->
<div id="checkoutSuccessLogoff">
<?php
  if (isset($_SESSION['customer_guest_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_GUEST;
  } elseif (isset($_SESSION['customer_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_CUSTOMER;
  }
?>
<div class="buttonRow forward"><a href="<?php echo  zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo  zen_image_button(BUTTON_IMAGE_LOG_OFF , BUTTON_LOG_OFF_ALT);  ?></a></div>
</div>
<!--eof logoff-->
<br class="clearBoth" />
</div>

<?php } else { ?>

<!--bof -gift certificate- send or spend box-->
<?php
// only show when there is a GV balance
  if ($customer_has_gv_balance ) {
?>
<div id="sendSpendWrapper">
<?php require($template->get_template_dir('tpl_modules_send_or_spend.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_send_or_spend.php'); ?>
</div>
<?php
  }
?>
<!--eof -gift certificate- send or spend box-->

<h1 id="checkoutSuccessHeading"><?php echo HEADING_TITLE; ?></h1>
<div id="checkoutSuccessOrderNumber"><?php echo TEXT_YOUR_ORDER_NUMBER . $zv_orders_id; ?></div>
<?php if (DEFINE_CHECKOUT_SUCCESS_STATUS >= 1 and DEFINE_CHECKOUT_SUCCESS_STATUS <= 2) { ?>
<div id="checkoutSuccessMainContent" class="content">
<?php
/**
 * require the html_defined text for checkout success
 */
  require($define_page);
?>
</div>
<?php } ?>
<!-- bof payment-method-alerts -->
<?php
if (isset($_SESSION['payment_method_messages']) && $_SESSION['payment_method_messages'] != '') {
?>
  <div class="content">
  <?php echo $_SESSION['payment_method_messages']; ?>
  </div>
<?php
}
?>
<!-- eof payment-method-alerts -->
<!--bof logoff-->
<div id="checkoutSuccessLogoff">
<?php
  if (isset($_SESSION['customer_guest_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_GUEST;
  } elseif (isset($_SESSION['customer_id'])) {
    echo TEXT_CHECKOUT_LOGOFF_CUSTOMER;
  }
?>
<div class="buttonRow forward"><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo zen_image_button(BUTTON_IMAGE_LOG_OFF , BUTTON_LOG_OFF_ALT); ?></a></div>
</div>
<!--eof logoff-->
<br class="clearBoth" />
<!--bof -product notifications box-->
<?php
/**
 * The following creates a list of checkboxes for the customer to select if they wish to be included in product-notification
 * announcements related to products they've just purchased.
 **/
    if ($flag_show_products_notification == true) {
?>
<fieldset id="csNotifications">
<legend><?php echo TEXT_NOTIFY_PRODUCTS; ?></legend>
<?php echo zen_draw_form('order', zen_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'SSL')); ?>

<?php foreach ($notificationsArray as $notifications) { ?>
<?php echo zen_draw_checkbox_field('notify[]', $notifications['products_id'], true, 'id="notify-' . $notifications['counter'] . '"') ;?>
<label class="checkboxLabel" for="<?php echo 'notify-' . $notifications['counter']; ?>"><?php echo $notifications['products_name']; ?></label>
<br />
<?php } ?>
<div class="buttonRow forward"><?php echo zen_image_submit(BUTTON_IMAGE_UPDATE, BUTTON_UPDATE_ALT); ?></div>
</form>
</fieldset>
<?php
    }
?>
<!--eof -product notifications box-->



<!--bof -product downloads module-->
<?php
  if (DOWNLOAD_ENABLED == 'true') require($template->get_template_dir('tpl_modules_downloads.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_downloads.php');
?>
<!--eof -product downloads module-->

<div id="checkoutSuccessOrderLink"><?php echo TEXT_SEE_ORDERS;?></div>

<div id="checkoutSuccessContactLink"><?php echo TEXT_CONTACT_STORE_OWNER;?></div>

<h3 id="checkoutSuccessThanks" class="centeredContent"><?php echo TEXT_THANKS_FOR_SHOPPING; ?></h3>
</div>
<?php } ?>
23 Mar 2011, 1:24 PM
#32
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

dw08gm:

Very useful indeed for higher priced items, such as art, or where payment for services is staged. In these cases, payment facility should include a payment regime eg number of payments at required percentages.

For art, a special button similar to the half-sticker used by galleries would be required, which allows others to purchase instead if the initial buyer delays or stalls payment.

Bookmarked this thread.

I am thinking about the easiest and stablest way to go about it. Doing the half sticker would add another level of complexity so that would need to come later. I am not guaranteeing anything, it might be a lot more work than I am prepared to do since I don't even need this functionality for my own projects and was just throwing the idea out there to help out the community to repay all of the support I got (and still get) when I first started and didn't know a thing. If nothing else I can give some opinions about what needs to be done and you can take that to a commercial developer to implement.

There is an installment payment module in the downloads and it might be easiest to extend that. I did have it on a site at one time but no one ever used it so we took it off to de-clutter the checkout page.

23 Mar 2011, 1:59 PM
#33
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,017
Plugin Contributions:
2

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

lankeeyankee:

I am thinking about the easiest and stablest way to go about it. Doing the half sticker would add another level of complexity so that would need to come later. I am not guaranteeing anything, it might be a lot more work than I am prepared to do since I don't even need this functionality for my own projects and was just throwing the idea out there to help out the community to repay all of the support I got (and still get) when I first started and didn't know a thing. If nothing else I can give some opinions about what needs to be done and you can take that to a commercial developer to implement.

The half sticker is complex and may be better suited to manual intervention. So too the percentage payment by date. To function efficiently, both would require automatic triggering of emails to advise customer and admin of pending date milestones.

There is an installment payment module in the downloads and it might be easiest to extend that. I did have it on a site at one time but no one ever used it so we took it off to de-clutter the checkout page.

I see this mod has been updated since I last looked early in 2010. This is the prime reason I submitted the following thread on Last Modified Date

http://www.zen-cart.com/forum/showthread.php?t=176324

Cheers

23 Mar 2011, 2:47 PM
#34
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

Probably the main drawback of this system as it stands is the actual checkout process. I'm basically using a butchered version of "accountholder" mod that processes the order without payment. We then have to forward an invoice manually for the deposit.

If there were a way to have the checkout process allow the customer to enter the deposit amount from a drop down menu, then have it calculate the new total, based on the attribute.... hmmmm.... I've given myself an idea on that one!

Does anyone know if price-by-attribute is able to adjust the price by a percentage, or by a decimalised factor?

24 Mar 2011, 2:54 AM
#35
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,017
Plugin Contributions:
2

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

An attribute arrangement could work for single item orders, however, as I intend to restrict the installment module to certain categories (Art and Services), if any other products are included in an order, the module will be disabled.

One also has to consider the shipping, whose price may change by the end of the payment period.

24 Mar 2011, 3:02 AM
#36
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

dw08gm:

One also has to consider the shipping, whose price may change by the end of the payment period.
Looks like you are talking about a "lay away" setup and not a deliver and get paid over time setup

24 Mar 2011, 3:19 AM
#37
dw08gm avatar

dw08gm

Totally Zenned

Join Date:
Sep 2008
Location:
DownUnder, overlooking South Pole.
Posts:
1,017
Plugin Contributions:
2

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

Could be that I need both mods - Layaway and Installments.

Thanks for that.