[support] Devel // ubercart 1.x Drupal 5: how to read variables?
sebastian
inforazor at gmail.com
Thu Nov 19 03:00:29 UTC 2009
Hi folks,
Ok I found out how to read and write variables, using variable_get() and
variable_set(). Pretty easy stuff once you know...
However, now I am still not sure where in the ubercart hooks I need to
inject my set and get variables.
Basically I have a script:
-=-=-=jscript=-=-=-
document.write(unescape("%3Cscript src='" + (location.protocol=="https:"
? "https://": "http://") + "cn.clickable.net/js/cct.js'
type='text/javascript'%3E%3C/script%3E"));
document.cookie=cct.CookieCheck(document.cookie);
cct.conversion_value=PASS_VALUE;
cct.cct_log('xxxxxhiddenxxxxx');
-=-=-=jscript=-=-=-
Which has to appear on the checkout completed page, but I need to pass
it the actual value of a SUCCESSFUL order, with the amount that the
order was; thus on the "thank you" screen. However all my ideas are not
working in how to implement this, and it is over my head since I am
still very new to ubercart and drupal.
Where in the ubercart code do I need to add to a hook something like:
variable_set ($my_order_amount, uc_currency_format($subtotal));
So that later in the checkout screen I can call:
variable_get ($my_order_amount) as part of the tracking script above
[where it says PASS_VALUE]?
Thank you so much for any help you can provide! Client is quite eager
for a solution.
Sebastian.
sebastian wrote:
> Hi folks,
>
> So I have devel installed on a drupal 5 system, but I don't see the
> "themer info" option like I do in Drupal 6...?
>
> I tried typing dpr() in the page tpl.php, but I don't get any output...
>
> Any tips on how to see the variables loaded on a page?
>
> What I am trying to see, if what the variable is, that is used to output
> an ubercart shopping cart checkout screen value.
>
> So the subtotal / total price values of the checkout amount.
>
> So that I can pass this variable to an external script.
>
> I've tried writing:
>
> <?php
> print '<br />debug: testing price printout: subtotal: ' .
> uc_currency_format($subtotal);
> ?>
>
> But I always get a zero dollar output; and I have the script at the
> bottom of the page.
>
> Any advise on either how to see the variables on Drupal5?
>
> OR
>
> On how to access the Ubercart's shopping cart total?
>
> Thanks!!!
>
> Sebastian.
>
>
More information about the support
mailing list