Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

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 smile
Any help please?

thanks!

CreativeDesigns
Junior Modder
ranks
useravatar
Offline
24 Posts
Administrator has disabled public posting

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?

CreativeDesigns
Junior Modder
ranks
useravatar
Offline
24 Posts
Administrator has disabled public posting

Re: Single Image on Virtuemart Category List page

it might be worth mentioning that i have disabled modules, components and other stuff to check if any of them are interfering with metamod, but even when they are disabled, the images still will not appear sad

CreativeDesigns
Junior Modder
ranks
useravatar
Offline
24 Posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

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 sad
ARGH! Sorry for the confusion.. and thank you again smile

Sam

CreativeDesigns
Junior Modder
ranks
useravatar
Offline
24 Posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3328 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5933
Posts this week:
3
User Info:
 
Total Users:
4421
Newest User:
rajajudi14
Members Online:
0
Guests Online:
86

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