News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

oncheckout_show_steps Not working!

Started by qb-virtue, February 10, 2015, 23:03:30 PM

Previous topic - Next topic

qb-virtue

Hello, I am on VM 2.6.14 and oncheckout_show_steps does not work. Is there something I'm missing?

I entered the following code just as a test and it will not work

<?php if (VmConfig::get ('oncheckout_show_steps'1) && $this->checkout_task === 'confirm') {
echo 'Here is step 4 so add html code with steps in divs with images that should be displayed on the end';
} else {
echo 'Here is step 1 so add html code with steps in divs with images that should be displayed on the beginning';
}
?>



but even on the confirm page it still outputs Here is step 1 so add html code with steps in divs with images that should be displayed on the beginning

GJC Web Design

the only way to prove if it works or not is to echo out your vars

(VmConfig::get ('oncheckout_show_steps', 1) && $this->checkout_task === 'confirm')

print 'Debug Line '.__LINE__.' oncheckout_show_steps <pre>'; print_r (VmConfig::get ('oncheckout_show_steps', 1)); print "</pre><br />\n";

print 'Debug Line '.__LINE__.' $this->checkout_task <pre>'; print_r ($this->checkout_task); print "</pre><br />\n";

if not what u expect work backwards
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

qb-virtue

Thank you for your response!

I tried your code and it worked, and then I was stumped. I looked at the code with a fresh eye this morning and I made a really stupid mistake. For anyone that tries this code... it does not work unless the option to "Show Checkout Steps" is checked in Virtuemart Configuration. Once I checked that, it started working as necessary.
<?php if (VmConfig::get ('oncheckout_show_steps', 1) && $this->checkout_task === 'confirm') {
      echo 'Here is step 4 so add html code with steps in divs with images that should be displayed on the end';
   } else {
      echo 'Here is step 1 so add html code with steps in divs with images that should be displayed on the beginning';
      }
   ?>