0

I'm working on an extension for expresso store and I want to output some variables, using print_r or echo but nothing is outputted on the front-end.

I'm logged in as admin, I have template debugging on, I have php enabled for the template I'm looking (and yes the template is calling the extension)

any help?

thanks Francesco

EE 2.9.3

1 Answer 1

2

put in die(); or exit(); after the stuff you'd like to inspect. otherwise your extension will keep running and you may not see the output.

3
  • this, especially with Expresso which will throw redirects in there, (product added -> redirect to cart), checkout button on cart == submit cart form -> redirect to checkout, ect... Another option is to dump your output to a (log) file so you don't have to die the code.
    – Blatant
    Commented Jun 4, 2015 at 16:21
  • Wonderfull! it works! So is it alwais needed to do like that? Commented Jun 4, 2015 at 19:12
  • Frequently, yes. Especially if you want to see your raw data before and after you've manipulate it. As mentioned you can log it to a file if you want to do comparisons after you've made code adjustments.
    – Jim Wyse
    Commented Jun 4, 2015 at 19:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.