Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Single Image on Virtuemart Category...
Single Image on Virtuemart Category List page
Single Image on Virtuemart Category List page
Stephen has been kind enough to help me out with sorting out my initial problem with MetaMod.. That part is still working great. However, I now need to know how to add an image in my left menu for the Virtuemart Category List page.. On the site, the page is "Products.html"
Here is my code:
$vm = JomGenius("virtuemart");
$img = "";
if ( $vm->check("pagetype = shop.browse") ) {
$category_id = $vm->info( "category_id" );
if ($category_id == "4") $img = "/images/silverware-pic.jpg";
if ($category_id == "5") $img = "/images/tables-chairs-pic.jpg";
if ($category_id == "7") $img = "/images/heating-pic.jpg";
if ($category_id == "8") $img = "/images/lighting-pic.jpg";
if ($category_id == "10") $img = "/images/extras-pic.jpg";
if ($category_id == "20") $img = "/images/marquees-pic.jpg";
}
if ($option == "com_virtuemart"
&& JRequest::getVar("page") == "shop.pricelist") {
$img = "/images/pricelist-pic.jpg";
}
if ($option == "com_virtuemart"
&& JRequest::getVar("page") == "products.html") {
$img = "/images/products-pic2.jpg";
}
if ($img != "") {
// customise path as appropriate for your site
echo '<img src="' . $img . '" />';
}
the bolded part is clearly the problem i'm having
Any help please?
thanks!
Re: Single Image on Virtuemart Category List page
Stephen, if you recall, this website (www.silverspoonhire.co.za) was in a sub folder when you and I were working on the above. I've moved it into the root folder now, but I see that the images have now stopped displaying on the left nav.. Any ideas why this would happen?
I've ensured that the sub folder name was taken out of the address, so not sure what is going on to be honest..
Any ideas?
Re: Single Image on Virtuemart Category List page
Hi,
I just logged in to look at it quickly. There were 3 problems with the MetaMod which I fixed for you:
1 - it was set to "logged in users only". I would have thought that you'd want everyone to see the images, so I set that to "all users".
2 - The MetaMod was set to "menu items: none". You need to set that to some valid menu items! It's only the module(s) that you are including that need to be set to none. So I set this to "all" and now it shows up.
3 - You had set the GeoIP thing to use GeoIP. This didn't stop the module working, but when debug was turned on it showed an error. Best to keep it off if you're not using it.
I added this PHP to detect the particular menu item and VM setup for the Products page:
if ($option == 'com_virtuemart'
and $Itemid == '54'
and JRequest::getVar("page") == ""
and JRequest::getVar("id") == ""
) {
$img = "/images/products_pic2.jpg";
}
Cheers,
Stephen
Re: Single Image on Virtuemart Category List page
you are AMAZING!!! Actually I lie.. BEYOND amazing!! Do you know that I sat here for more than 5 hours yesterday trying to figure out why this was happening? you saved my life!
Thank you!
I didn't think to look at those settings because we had it working perfectly on the sub folder.. I literally moved everything "as is" over to root.. Didn't think that the settings on MetaMod would change
ARGH! Sorry for the confusion.. and thank you again
Sam
Re: Single Image on Virtuemart Category List page
Hi Sam,
honestly, the module settings don't change themselves, even when changing from a subfolder to the main site. At some point you must have made a couple of little changes in an effort to get it working... it's an easy thing to happen, don't worry about it.
Cheers,
Stephen
- Index
- » MetaMod
- » MetaMod General Support
- » Single Image on Virtuemart Category...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7638
- Newest User:
- moner86658
- Members Online:
- 0
- Guests Online:
- 103
- 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