Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

BUYSAFE question


vashichino7

Recommended Posts

Posted

Hey guys, so I have added buysafe to our website and one of the last steps is when the customer receives a survey in which after they process the order, three of our values need to be fed to them which is the order#, the sub-total, and the email. This gets to buysafes database where they will email the customer their buysafe guarantee... I have been going back and forth with one of the IT reps and we have just gotten stuck...

 

Here is the explanation:

 

What we need to find out is the values for the customer’s email address, the item subtotal and the order number. We believe we have the right values that we pulled from the checkout_process.php page: $insert_id, $order->products['price'], and $order->customer['email_address'], but once we have added print_r() statements to display the values, nothing happens.

 

Once we find the correct variables, we need to add them to the JS code below, and add this block on the checkout_process.php (most likely this one since these variables don’t seem to be passed to the success page) or checkout_success.php page.

 

<?php

$order_id = $insert_id;

$item_price = $order->products['price'];

$customer_email = $order->customer['email_address'];

?>

 

<!-- BEGIN: buySAFE Guarantee -->

<span id="BuySafeGuaranteeSpan"></span>

<script src="//seal.buysafe.com/private/rollover/rollover.js"></script>

<script type="text/javascript">

if(window.buySAFE && buySAFE.Loaded) {

buySAFE.Hash = 'buysafe hash code in here';

buySAFE.Guarantee.order = '<?php echo $order_id; ?>';

buySAFE.Guarantee.subtotal = '<?php echo $item_price; ?>';

buySAFE.Guarantee.email = '<?php echo $customer_email; ?>';

WriteBuySafeGuarantee("Javascript");

}

</script>

<!-- END: buySAFE Guarantee -->

 

 

Has anyone ran into the same issue? Any help here would be appreciated.

 

Best Regards,

Von

Posted

checkout_process.php has no displayable code, and it redirects to checkout_sucess.php when it's finished. You need to add die; after your print_r() to make the output visible.

 

Once you have your variables, you need to come up with a way to transmit them without outputting any HTML. The HTML you posted above will not work on this page. If you need that HTML to be visible, you could set those variables as session variables, insert your code on the checkout_success page, and then destroy the session variables.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...