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.

 

[SOLVED] Virtuemart Featured Products in Browse Pages Problem

[SOLVED] Virtuemart Featured Products in Browse Pages Problem

Hello,

I apologise if you have gotten repeated questions on this subject but I have been unable to find the solution myself.  I was told that MetaMod can achieve what I am trying to do but can't figure it out.  I am trying to show the Virtuemart Featured products on the Joomla frontpage but not have them placed on the Virtuemart browse or checkout pages.

I have tried following the Metamod Quick Start and read through the Control modules on Virtuemart pages as well as many forum topics without success.

---

I am using Joomla V1.5.23, Virtuemart V1.1.8, and MetaMod V2.6.

I have the Main Menu 'Home' button connecting to an article.

I have the actual Featured Products module(mod_virtuemart_featureprod)setup with the module position "contentfeatured" which is not in my index.php file. -> Screenshot

I then have a Metamod Module assigned to the module position "content" which is in my index.php file.  The php code I am sure is wrong but I have tried a bunch of different variants that I have found on these forums.  But here is a screenshot of what this module looks like at the moment. -> Screenshot 2


I am hoping I have just overlooked something, any help would be very appreciated!

Let me know if you need any more information.

Regards.

Edited By: graceph
18-May-11 02:28:58

graceph
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Re: [SOLVED] Virtuemart Featured Products in Browse Pages Problem

Hi graceph,

I think you're close to having the right code. Let's run over the setup one more time:

1 - Eventually you want the target module (Featured Products) to show up only on the article page, in the module position "content".

2 - so you have assigned the MetaMod to the "content" position. That's good.

3 - the target module is assigned to a module position that's not in the index file (contentfeatured). That's good.

4 - you have put the name of the module position into the "quick module position or id include" box. This is NOT good. If you put it in here, then any modules in that position are going to get included no matter whether the PHP returns anything or not. Just leave that box blank in this case.

5 - the content of the PHP box. You're using a check for the "VM frontpage". However, you stated that the front page of your site is actually an article. That's not the same as the VM Frontpage, which is a very particular thing (a menu item of type "Virtuemart").

I'd recommend that you instead do a check to see if you are on that particular article ID page. You can find the article id in the article manager, then use some code like this:

if ($content_genius->check("article_id = XXX")) return "contentfeatured";
// replace XXX with the article id that you're using as the front page.

In this recipe you don't even need to tell it the id of the module (48). You just tell it to include any modules from inside "contentfeatured" into the current module, which happens to be in the "featured" position.

I'm pretty sure this is going to work, based on the information that you gave. I assume that if someone clicks on an item in the featured products module, it's going to take them to a page that's NOT displaying that front page article, and this will cause the PHP above to NOT include the target modules onto the page.

Best regards,
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
3313 Posts
User info in posts
Administrator has disabled public posting

Re: [SOLVED] Virtuemart Featured Products in Browse Pages Problem

Ahh amazing!

This problem had given me far too much grief.

Your solution worked 100% perfectly. - I appreciate it very much.

Thank you, keep up the excellent work, metamodguy!


Kinds regards,
Graceph

graceph
Beginner Modder
ranks
useravatar
Offline
2 Posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10727
Newest User:
solza2
Members Online:
0
Guests Online:
194

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