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.

 

use Camaleon for joomshopping

use Camaleon for joomshopping

i bought this component thinking that is possible use for joomshopping.

i have a e-commerce website with joomla 2.5.6 that contain some cadegories of products.

Each category is assigned to a menu item, each menu item is assigned a different template ... when I open a single product the template back to default and not the same of when view the category. how can I force the template with this right?

Best Regards
Roberto Mariani

marcoscia
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: use Camaleon for joomshopping

Hi Roberto,

I am sure you will be able to use this with JoomShopping, although I have never tested or tried it. Chameleon is very flexible and can cope with most things, even though sometimes it takes a little while to get right.

The first thing to do is to work out what SHOULD happen!

i.e. it sounds like every product belongs to 1 category, every category has a menu item, and every menu item has a different template.

Therefore what we want to do in Chameleon is to be able to detect the category of the product, if it's on a product page, and use that to change the template.

The first thing I would like to try is to see if the category ID is placed into the raw URL (may not be visible in the SEF one). If it is, then it's really easy to detect this in Chameleon and use it to set the template.

So, can you create a new rule in Chameleon, name it, then in the PHP box in the SUCCEED action, put the following PHP:

print_r($_GET);

Then try to view some pages on the front-end of the site. Sometimes this makes the site crash... but usually it just prints out some text at the very top of the page, and often upsets the formatting of the page.

The important thing I want to see is what gets printed out at the top of the page when you are on a product details page. Can you get a copy of that text (might need to view page source) and paste it into the forum for me to see?

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

Re: use Camaleon for joomshopping

hello! I do not have sef mode activated. then take you back safely the url visible from a product page.


http://store.e-movement.biz/index.php?o … mp;lang=it

the category as you can see is the 13 assigned to a menu item. I though 'I can not create a rule to force the products that belong to that category and come from that menu item. I hope you have time to help me!

thanks a lot

marcoscia
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: use Camaleon for joomshopping

I'm doing the test on category 14. I created a rule that creates a session variable to capture the url and category_id = 14

then another rule that reads the session variable A and associates the template
so everything is right.

But the modules visible on the product page are not the same assigned to the category and then the menu but those of the home!

how can solve it?have you idea?

marcoscia
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: use Camaleon for joomshopping

Another question sorry...

can i increase the number of session variable? or are fixed for only with a-b-c-d option?

i have many category to set rules!

marcoscia
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: use Camaleon for joomshopping

Array ( [option] => com_jshopping [controller] => product [task] => view [category_id] => 14 [product_id] => 90 [Itemid] => 1356 [lang] => it [language] => it-IT )

this is the url that this is taken from the URL string in a product page that you asked me

marcoscia
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: use Camaleon for joomshopping

Hi Roberto,

You shouldn't need to use the session variables, so the number of session variables should not be a problem.

All you need to do is create a new rule for each category id.

In each rule, use the following PHP:

if (
  $option == "com_jshopping"
  and JRequest::getVar("task") == "view"
  and JRequest::getVar("controller") == "product"
  and JRequest::getVar("category_id") == 14) {
    return true;
}

Then in the Succeed Action, use the dropdown to choose the template that you want to show for category 14.

In each rule, do the same thing but vary the category id number in the PHP, and the template in the dropdown.

This will detect when a product is being displayed, and will test the category id. If the given category id is found, it will set the appropriate template. Just create as many rules as you need to detect all the categories.

Easy!

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

Re: use Camaleon for joomshopping

the template it's ok but in some product of some category in the link the iteam parameter (item menu of category) is wrong :-(

marcoscia
Beginner Modder
ranks
useravatar
Offline
9 Posts
Administrator has disabled public posting

Re: use Camaleon for joomshopping

Do you mean the Itemid parameter? If so, that doesn't matter - we're not checking for that, we're just basing it on the category id.

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: use Camaleon for joomshopping

then you upgrade! to assign the template I created a rule that says the session cookie "A" if the url contains the parameter "category_id = 14" and a rule to capture the session cookies "A" and if it contains a "category_id = 14 "associated with the template!in the products through the menu all ok!

if I open a product from the main page the template is made ​​the same but changing the type of menu item by category view to Product View is loaded only the template and not the right modules. I noticed this from the URL, and this for me depending on the menu item that is wrong and loads the modules of the home page.

you can see how it works to learn more about http://store.e-movement.biz/ go to mainmenu italian lenguage and select:
HOME -> Visita gli E-store-> Fashion -> Rumjungle

if you click immediately on one product viewed in this page you will see the detailed page product with the modules of the home of all the portal if you go to the menu categories and  select one of them you see a product with the modules page Rumjungle!

Thank for your great assistance

marcoscia
Beginner Modder
ranks
useravatar
Offline
9 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:
4397
Newest User:
tull687318
Members Online:
0
Guests Online:
209

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