Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Navbar on Checkout page

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-27-2015, 12:07 PM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Navbar on Checkout page

Does anybody know how to turn the navbar and minicart on the checkout page? I'm sure this is easily accomplished, just not sure which file to find it in. I've been looking, but haven't found what controls it yet.
__________________
Ver 5.2.6
Reply With Quote
  #2  
Old 05-04-2015, 03:13 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Navbar on Checkout page

Hello Phil,

If you want to display all standard navbars on checkout page, then you can decorate the isCheckoutLayout() method of the \XLite\Controller\Customer\ACustomer class and define it as false.

It should do the trick.

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #3  
Old 05-05-2015, 10:10 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: Navbar on Checkout page

Quote:
Originally Posted by tony_sologubov
Hello Phil,

If you want to display all standard navbars on checkout page, then you can decorate the isCheckoutLayout() method of the \XLite\Controller\Customer\ACustomer class and define it as false.

It should do the trick.

Tony
Please forgive me for my ignorance here, but how do I define it as false. I've tried decorating this as you suggested, but I must be doing something wrong. Can you give a little more specific information on how to achieve this.
__________________
Ver 5.2.6
Reply With Quote
  #4  
Old 05-05-2015, 04:51 PM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Navbar on Checkout page

Phil,
Do you know how to decorate a class in your own module? If not watch some of my tutorials on the subject. (Link in sig)

That should get you warmed up. After you have your module setup and going you want to decorate the class that Tony referenced above.

Then include this in the code of your decorated class. This should be the only method that you have to define in your class, otherwise the file will be empty except for opening tag, namespace and opening class defintion:

Code:
/** * Return true if checkout layout is used * * @return boolean */ public function isCheckoutLayout() { return false; }
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #5  
Old 05-06-2015, 02:40 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default Re: Navbar on Checkout page

@Phil,

You may also want to check the KB guide about decoration here:
http://kb.x-cart.com/display/XDD/Step+3+-+applying+logic+changes

If you still have questions after reading and watching, do not be confused and just ask us here. I will be glad to explain the concept in more details if needed.

Tony
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
  #6  
Old 05-06-2015, 03:39 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: Navbar on Checkout page

Quote:
Originally Posted by totaltec
Phil,
Do you know how to decorate a class in your own module? If not watch some of my tutorials on the subject. (Link in sig)

That should get you warmed up. After you have your module setup and going you want to decorate the class that Tony referenced above.

Then include this in the code of your decorated class. This should be the only method that you have to define in your class, otherwise the file will be empty except for opening tag, namespace and opening class defintion:

Code:
/** * Return true if checkout layout is used * * @return boolean */ public function isCheckoutLayout() { return false; }
That is basically the code I was trying. Is there something wrong with my namespace maybe?


<?php

namespace XLite\Module\Pmall\PmallSkin\Controller\Customer;

abstract class ACustomer extends \XLite\Controller\AController implements \XLite\Base\IDecorator
{
public function isCheckoutLayout()
{
return false;
}
}
__________________
Ver 5.2.6
Reply With Quote
  #7  
Old 05-06-2015, 04:49 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Navbar on Checkout page

What is the name of the file? Is it ACustomer.php? Is it saved in the directory XLite/Module/Pmall/PmallSkin/Controller/Customer/? Does it show up in the var/run after rebuild?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #8  
Old 05-06-2015, 05:24 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Navbar on Checkout page

Oh, I see what is wrong. Your are not extending the right class. You are extending the class that the original ACustomer class extended. You want to extend ACustomer
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote
  #9  
Old 05-06-2015, 06:27 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Navbar on Checkout page

Here is my functioning code:
Code:
<?php namespace XLite\Module\Guru\GoUnmanned\Controller\Customer; abstract class ACustomer extends \XLite\Controller\Customer\ACustomer implements \XLite\Base\IDecorator { public function isCheckoutLayout() { return true; } }
The file is saved as: XLite/Module/Guru/GoUnmanned/Controller/Customer/ACustomer.php

I hope it helps.
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote

The following 2 users thank totaltec for this useful post:
Phil Richman (05-06-2015), tony_sologubov (05-08-2015)
  #10  
Old 05-06-2015, 07:49 AM
 
Phil Richman Phil Richman is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 94
 

Default Re: Navbar on Checkout page

Thank you mike
__________________
Ver 5.2.6
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:30 AM.

   

 
X-Cart forums © 2001-2020