Jump to content


Corporate Sponsors


Latest News: (loading..)

goring_gap

Member Since 13 Nov 2003
Offline Last Active Nov 15 2011, 07:28
-----

Posts I've Made

In Topic: Integration - MD5 signature problem - WorldPay Select Junior v1.0

09 November 2011, 15:26

If you want to use multiple currencies try:

replacing:



$process_button_string .= tep_draw_hidden_field('M_sid', tep_session_id()) .
								tep_draw_hidden_field('M_cid', $customer_id) .
								tep_draw_hidden_field('M_lang', $language) .
								tep_draw_hidden_field('M_hash', md5(tep_session_id() . $customer_id . $order_id . $language . number_format($order->info['total'], 2) . MODULE_PAYMENT_WORLDPAY_JUNIOR_MD5_PASSWORD));



with:


  $process_button_string .= tep_draw_hidden_field('M_sid', tep_session_id()) .
								tep_draw_hidden_field('M_cid', $customer_id) .
								tep_draw_hidden_field('M_lang', $language) .
								tep_draw_hidden_field('M_hash', md5(tep_session_id() . $customer_id . $order_id . $language . number_format($this->format_raw($order->info['total']), 2) . MODULE_PAYMENT_WORLDPAY_JUNIOR_MD5_PASSWORD));

otherwise the callback will fail

In Topic: [Contribution] Discount Coupon Codes

15 August 2011, 07:43

There seems to be a session issue when using this with version 2.2

Coupons are not showing first time. If you refresh checkout_confirmation.php then the discount shows.

This is because the coupon code in classes->orders.php does not see the session the first time (I don't know why).

My solution was to pre-register the session on the checkout_payment.php page.

You only need this if you have the issue above!

in checkout_payment.php find:


<?php
/* kgt - discount coupons */
	if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) {
?>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><b><?php echo TABLE_HEADING_COUPON; ?></b></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><?php echo ENTRY_DISCOUNT_COUPON.' '.tep_draw_input_field('coupon', '', 'size="32"'); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
<?php
	}
/* end kgt - discount coupons */
?>

change to:


<?php
/* kgt - discount coupons */
	if( MODULE_ORDER_TOTAL_DISCOUNT_COUPON_STATUS == 'true' ) {
?>
      <tr>
        <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><b><?php echo TABLE_HEADING_COUPON; ?></b></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
          <tr class="infoBoxContents">
            <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main"><?php echo ENTRY_DISCOUNT_COUPON.' '.tep_draw_input_field('coupon', '', 'size="32"'); ?></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
      </tr>
<?php
	if (!tep_session_is_registered('coupon')) tep_session_register('coupon'); //fix - session not registering
	}
/* end kgt - discount coupons */
?>


Regards,
Simon

In Topic: [contribution] Tracking Module

13 July 2011, 12:06

View Postchris23, on 11 April 2008, 23:16, said:

Hi Tony,

$%£"! Royal Mail!

The first one isn't working as there is a bad alt tag in the HTML alt='it's on its way' - note the single quote within single quotes. This is causing strip_tags to choke.

The second one works as it's been delivered and doesn't have the offending alt tag.

To fix this, edit rm_tracking.php

AFTER

// Grab delivery status information and POD data.
	$text = preg_match('/<div class="track-right-box">(.*)<div class="FlexiList( default| null)">/i', $grab_data, $content);


ADD:

	$content[1] = addslashes($content[1]);

This tidies up the HTML sufficiently for strip_tags to clean the rest. I get the feeling I'm going to be chasing my tail with RM ....

HTH

Chris

This did not work for me so I used...

// Grab delivery status information and POD data.
    $text = preg_match('/<div class="track-right-box">(.*)<div class="FlexiList( default| null)">/i', $grab_data, $content);
	
	//$content[1] = addslashes($content[1]);
    $content[1] = str_replace("'", "", $content[1]); //fix for "it's" on RM page - only shows at certain RM stages