Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
Hide module from Aceshop (opencart) checkout
Hide module from Aceshop (opencart) checkout
hello
I see there are some code snippets for hiding a module from virtuemart, so I was wondering if there is a way to do this with aceshop (opencart). currently on the site I have a module in the 'right' position which shows the store categories. I would like to have this not appear on the checkout or register page, but can't quite figure how I would do this.
any help is greatly appreciated
regards
robb
Re: Hide module from Aceshop (opencart) checkout
Hi,
for relatively simple "on this page not that page" type rules, try turning on the Advanced Debug mode in the MetaMod. Then navigate to some of the pages that you want the module to be hidden on, or to show on. You'll see some PHP code displayed in the MetaMod that helps to identify the page it's on.
If you're handy with PHP this should give you enough to get started. If you're not, paste the output from the MetaMod Debug into the forum with a note about which pages they relate to, and whether the module should appear on that page or not. Then I'll help to knock that PHP into shape so it does what you want.
Cheers,
Stephen
Re: Hide module from Aceshop (opencart) checkout
Stephen
you are awesome! following the direction you provided, I was able to see what the proper code would be to have the module on all pages in the store except the checkout.
for anyone else who is looking for this functionality, here's what I did with mine:
if (
$option == 'com_aceshop'
and $Itemid == '112'
and JRequest::getVar('route') != 'checkout/cart'
) return XXX;
thanks for making this incredible and valuable module system!
robb
Re: Hide module from Aceshop (opencart) checkout
Re: Hide module from Aceshop (opencart) checkout
I'm hoping this can help me.
I'm using joocart (opencart) and similar to the above person I'd like modules (initially mod 196) to appear throughout a very small shop but not within the checkout process.
the advanced debug is giving me this.
if (
$option == 'com_opencart'
and $view == 'home'
and $Itemid == '139'
and $jinput->get('route') == NULL /*!*/
) return XXX; /* replace XXX with the module ID or position to display */
any help would be great, i'm not a php expert
Re: Hide module from Aceshop (opencart) checkout
Hi firkindesign,
can you please tell me which page the debug output came from? Was it from the checkout page?
Ideally can you please send a series of those debug outputs, one from each page on the checkout process? (e.g. there might be several different pages like editing the shipping address, coupon pages, payment options, etc). It might be necessary to check for each version of those to know when not to place the module on the page.
Thanks,
Stephen
Re: Hide module from Aceshop (opencart) checkout
this is the debug for a product page
if (
$option == 'com_opencart'
and $Itemid == '139'
and $jinput->get('product_id') == '53' /*!*/
and $jinput->get('route') == 'productproduct' /*!*/
) return XXX; /* replace XXX with the module ID or position to display */
MetaMod debug info:
Module ID: 196
$option: com_opencart
$view:
$id:
$Itemid: 139
$timezone: UTC
$language: en-us
$language_code: en
$language_region: us
Including modules: None
This is the debug throughout the checkout process, its a serious of drop downs (then refers to the merchant account)
if (
$option == 'com_opencart'
and $Itemid == '139'
and $jinput->get('route') == 'checkoutcart' /*!*/
) return XXX; /* replace XXX with the module ID or position to display */
MetaMod debug info:
Module ID: 196
$option: com_opencart
$view:
$id:
$Itemid: 139
$timezone: UTC
$language: en-us
$language_code: en
$language_region: us
Including modules: None
Re: Hide module from Aceshop (opencart) checkout
Ok, so if you want to specifically exclude the checkoutcart page as specified above, you can do this:
if (
$option == 'com_opencart'
and $jinput->get('route') == 'checkoutcart'
) return; // don't show anything on that page
else return XXX;/* for all other pages: replace XXX with the module ID or position to display */
Re: Hide module from Aceshop (opencart) checkout
Okay, I'm trying to display module 197 in the shop items and throughout but I dont want it to appear during checkout.
I'm not sure how I set this up.
I have created a metamod module and placed the code above into the php area, published it. I havent attached it to any pages.
Module 197 is published also and attached to the SHOP menu item.
I am using joomla 2.5
metamodpro 1.6 -2.5
i am a total mod novice
Re: Hide module from Aceshop (opencart) checkout
1 - create the target module (in this case 197)
2 - set the target module to NO pages
3 - create the MetaMod and set it to ALL pages, and ensure it's published and set to the correct module position where you want the other module to appear.
4 - in the MetaMod use this PHP:
if (
$option == 'com_opencart'
and $jinput->get('route') == 'checkoutcart'
) return; // don't show anything on that page
else return 197;
So now module 197 will appear on all pages on the site EXCEPT the checkoutcart pages. Does that work for you? Make sure you follow the instructions above!
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7629
- Newest User:
- claudiabush9
- Members Online:
- 1
- Guests Online:
- 137
- Online:
- claudiabush9
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked