Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Display module in VM Browse Pages
Display module in VM Browse Pages
Re: Display module in VM Browse Pages
Hi BlazedStars,
can I please ask you to give some more details?
"All the VirtueMart Categories" -- do you mean only on the category listing pages? Or also on individual products irrespective of category?
"entire browse pages" -- ?? I'm not sure what you mean.
And do you want these 2 rules combined, or as separate rules (separate MetaMods)?
If you can give some example URLs (especially with SEF turned off) then they help a lot in order to see what you mean.
Thanks,
Stephen
Re: Display module in VM Browse Pages
Thank you for your response.
Sorry about that. I forgot to be more specific.
What I mean is that I want to display for ex, module id 49 only in the following virtuemart pages (Browse Pages, Category listing pages, Product details pages and VM Shop frontpage). I will be using only 1 rule since the module will be displayed in the same position throughout the pages mentioned above. I hope this helps clear out my previous question. If I forgot anything or you need more info, just let me know. Thanks
Re: Display module in VM Browse Pages
Sorry if this is a dumb question... I should probably know the answer... what's the difference between a browse page and a category list page? Aren't they the same thing?
So without SEF URLs turned on, I get the following example URLs on my test site that I think are the ones that you want to see the module on. Can you confirm these?
Front shop page, when the VM component is assigned to a menu:
index.php?option=com_virtuemart&Itemid=83
Category list page:
index.php?option=com_virtuemart&page=shop.browse&category_id=1&Itemid=74
Browse page (List All Products??):
index.php?page=shop.browse&category=&option=com_virtuemart&Itemid=74
Product detail page:
index.php?page=shop.product_details&flypage=flypage.tpl&product_id=8&category_id=2&option=com_virtuemart&Itemid=74
If my assumptions are accurate, then I would use the following recipe to target these pages only:
if ($option == "com_virtuemart") {
$page = JRequest::getVar("page");
$category_id = JRequest::getVar("category_id");
$category = JRequest::getVar("category");
if ( $page == null /* front page */
or $page == "shop.browse" /* covers browse and category pages */
or $page == "shop.product_details") { /* details page */
return 49;
}
}
Hope that helps... write back if it needs any tweaking.
Cheers,
Stephen
Re: Display module in VM Browse Pages
metamodguy wrote:
Hi BlazedStars,
can I please ask you to give some more details?
"All the VirtueMart Categories" -- do you mean only on the category listing pages? Or also on individual products irrespective of category?
"entire browse pages" -- ?? I'm not sure what you mean.
And do you want these 2 rules combined, or as separate rules (separate MetaMods)?
If you can give some example URLs (especially with SEF turned off) then they help a lot in order to see what you mean.
Thanks,
Stephen
Hii Stephen..
I have same case with bilzardstars..
My product is only show in product details.. Not in category or browse page..
How to solve this problem?
Thanks for your help..
Re: Display module in VM Browse Pages
Hi yo0505,
like BlazedStars, I need to ask you to write down exactly what you want to happen. It's not clear from you post if what you are describing is how things are *now*, or how you *want* them to be.
The more precise you can be, the better! There are so many possibilities...
Thanks,
Stephen
Re: Display module in VM Browse Pages
almost same prob
VM dont show any products on category page if all products are on subcategories, it has default feature — show featured, but its stupid and show featured not from sub categories, but takes all featured. So i find the way to show there module 'featured' that can be tuned to show categories by id.
so i am taking MetaMod, setting it
position: user1 (do i need same in index.php?)
menus: none;
use this code in PHP area:
if ($option == "com_virtuemart") {
$category_id = JRequest::getVar("category_id");
$category = JRequest::getVar("category", null);
$page = JRequest::getVar("page");
if ($page == "shop.browse") {
if ($category_id == "1") return 20;
}
}
my mod_virtuemart_featureprod seetings:
position: user1 (same — do i need it in index.php of template? )
Menus: none
and i cant see it on my category page: http://www.oktet.net.ua/index.php?optio … p;Itemid=4
also i was trying to make it works with other modules or other rules and no luck
any ideas?
Re: Display module in VM Browse Pages
Hi Tyv,
the first problem you have is that the MetaMod is set to "menus: none". The MetaMod itself has to be assigned to some page(s), or else Joomla will never run your code. So assign the MetaMod either to "all" pages, or just to the menu item you have set up for Virtuemart.
You're right to set your "included module" to "menus:none" though.
You asked "do I need same in index.php". Well, you need that module position to exist in your template, definitely. But you don't need to edit any code in the template.
Your PHP code looks fine, though you don't actually need your 3rd line ($category = JRequest...) because you're not using $category anywhere.
Hope that helps,
Stephen
Re: Display module in VM Browse Pages
Thanks for helping me out. The code you previously gave me works like a charm. The only thing that I find, that is not working is the frontpage modules are not displaying as they should. Every other page displays the module after adding the code to metamod, except the frontpage. Can you help me out once again? I've sent you the link to my website. Please check your private messages. Thanks and Happy Holidays!
- Index
- » MetaMod
- » MetaMod General Support
- » Display module in VM Browse Pages
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Posts this week:
- 2
- User Info:
- Total Users:
- 7642
- Newest User:
- mary26
- Members Online:
- 0
- Guests Online:
- 171
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked