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.

 

New module problem

New module problem

Hi, I bought the pro version a couple of weeks ago, and im very happy with this module. However, i need some help setting up a new module i have put on my site.

I have installed a Acynewletter module, and i have made it so it appears from wall to wall, 920px wide. (See bottom here www.dropz.no) This is fine for the front page. However, if you click further on the site to another page, say here: http://www.dropz.no/forhenne, you see that the set up of the other metamodule settings are push this newsletter module to the right and out of the screen.

I wonder if its possbile to:

1.
Make this module "unaffected by the other elements", so that its the same as the front page on all pages. (920px wall to wall)

2.
Remove it from cart

Edited By: Tormodnor
17-Jun-11 03:22:14

Tormodnor
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: New module problem

Hi Tormodnor,

the basic display issues for that module on different places would best be tackled with CSS. You appear to have it in a module position that is limited to 150px (via CSS class "gk-mass". Perhaps there's another module position that you can put it in that uses the full width of the template (100%) rather than a particular pixel width?

If you want to remove it completely from cart pages, then you can use this to *include* it on all pages apart from cart pages:

$vm = JomGenius("virtuemart");
if (! $vm->check("pagetype = shop.cart")) return XXX;
// replace XXX with module id of acymailing module

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
3314 Posts
User info in posts
Administrator has disabled public posting

Re: New module problem

Hi again:)

I tried that code, but it actually didnt work. Might it be because of conflicts with the other codes?

Here is my setup now, including the last codes you wrote on the bottom:

$vm = JomGenius("virtuemart");


if ($content_genius->check("article_id = 76") ) return "164, 167, 166, 169, 171";

if ($vm->check( "pagetype = none of shop.product_details, shop.browse" ) ) return;

if ($vm->check( "category_id = 1,2,3,4,5,6,14,16,17,18,19,20,27,25,26,28,29,30" ) ) return "164, 167, 166, 169, 171";

if ( $vm->check("pagetype = shop.product_details") ) {
  return "164, 167, 166, 169, 171";
}

if (! $vm->check("pagetype = shop.cart")) return 144;

Tormodnor
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: New module problem

Hi Tormodnor,

PHP will run each of the lines of code in order. If it hits a "return" statement then it won't go any further - it will stop at that point and display the modules that you returned.

Let's look at each line in turn:

- the article_id check: fine
- next line returns NO modules unless you are on the shop.product_details or shop.browse pages
- next line checks for certain VM categories and returns a set of modules if you are on one of these categories. This works fine with the previous line because these categories can normally be found only if you are on shop.product_details or shop.browse page.
- next section checks places some modules on the page if you're on a product details page and it wasn't in one of the categories in the previous line.
- lastly there's a check for anything other than the "shop.cart" page. But if the user was on a shop.cart page they would have "returned" already in the first pagetype check.


I think what you are wanting is that for the shop.cart page there should be no modules, for shop.product_details and shop.browse there are some specific modules based on the category, and for all other VM pages display module 144, correct?

So I'd structure it like this:

Code:

$vm = JomGenius("virtuemart");

// specific articles on site, list of modules:
if ($content_genius->check("article_id = 76") ) return "164, 167, 166, 169, 171";

// for shopping cart, no modules:
if ($vm->check("pagetype = shop.cart")) return;

// default module #44 shown on all pages except
// shop.product_details and shop.browse:
if ($vm->check( "pagetype = none of shop.product_details, shop.browse" ) ) return 144;

// for any products or categories in this category list,
// show list of modules:
if ($vm->check( "category_id = 1,2,3,4,5,6,14,16,17,18,19,20,27,25,26,28,29,30" ) ) return "164, 167, 166, 169, 171";

// for any individual products that weren't in that list of
// categories, show list of modules:
if ( $vm->check("pagetype = shop.product_details") ) {
  return "164, 167, 166, 169, 171";
}

// by the time we get to here the only thing left is a
// shop.browse page that's not in the list of categories
// from earlier. You can choose what you want to show in
// this case. I guess module 44?
return 44;

Hope that's what you're after,
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
3314 Posts
User info in posts
Administrator has disabled public posting

Re: New module problem

Hi,

Thats also not 100% correct. The only thing not working correct is that i dont want module 144 to show up in cart..

I have these two lines(below) for the cart. The first line is to prevent any modules, especially the category list module, to appear in the cart. The second one is to specify, since it appears anyway, that module 144 also should not appear in cart. But it doesnt seem to work..

if ($vm->check("pagetype = shop.cart")) return;

if ($vm->check( "pagetype = shop.cart") ) return 144;

Tormodnor
Beginner Modder
ranks
useravatar
Offline
13 Posts
Administrator has disabled public posting

Re: New module problem

Hi Tormodnor,

as far as I can see from the PHP that I sent last time, if you are on the shop.cart page then there should be no modules on that page at all. Or at least, no modules that are being controlled by the MetaMod.

Perhaps module 144 is being assigned onto the page but not via a MetaMod?

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
3314 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1691
Total Polls:
6
Total Posts:
5912
Total Posts Today:
6
User Info:
 
Total Users:
11527
Newest User:
david9684
Members Online:
3
Guests Online:
173


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked