Author Topic: linking from browsepage and flypage to all products from manufacturers page  (Read 1850 times)

zvenson

  • Beginner
  • *
  • Posts: 28
    • acousticsdb - room acoustics matters
Hi!
I want to link from the flypage and browsepage to the page that shows all products by a manufacturer. The main problem is to create the link because i actually don't know how to do that :).
On browse- and flypage the manufacturerID is already there but what about the Itemid?

an example to the page i want to link to is :
Code: [Select]
/index.php?option=com_virtuemart&page=shop.browse&manufacturer_id=6&Itemid=54
 so this should not be so hard to be done with the manufacturer_id but i'm somehow stuck on how to get the Itemid. Maybe someone can help me out.

Thank you guys!
cheers

sven
http://www.acousticsdb.com - room acoustics matters
http://www.webdesignhamburg.net - webdesign aus Hamburg

zvenson

  • Beginner
  • *
  • Posts: 28
    • acousticsdb - room acoustics matters
oh just figured out that i don't need to worry about the itemID :)

just put this on your flypage

Code: [Select]
<!-- Back to all Products start-->
<a href="index.php?option=com_virtuemart&page=shop.browse&manufacturer_id=<?php echo $manufacturer_id ?>">alle produkte</a>
<!--  Back to all Products ende -->

the only thing i need now is a sidebar module with this code in it - let you know if this works.

cheers
 
http://www.acousticsdb.com - room acoustics matters
http://www.webdesignhamburg.net - webdesign aus Hamburg

zvenson

  • Beginner
  • *
  • Posts: 28
    • acousticsdb - room acoustics matters
oh boy  ??? - it's driving me nuts! I can access the manufacturer_id on the flypage as described in this thread - but i cannot make it accessible in the sidebar. Can anybody help me on finding out how to make the manufacturer_id accessible?

I managed to get the category_id in my sidebar module by using this code
Code: [Select]
$category_id = vmGet($_REQUEST, "category_id", null);this works on all pages - wherever there are products in categories there is a categoriy_id
if i use
Code: [Select]
$manufacturer_id =  vmGet($_REQUEST, "manufacturer_id", null);the manufacturer_id is only showing when i visited the fly- and browsepage via the mod_virtuemart_manufacturers sidebox - otherwise no manufactur_id is there.

Now i need to "translate" the categories_id into the manufacturers_id. I tried with this code but it's not working - always get an sql error....

Code: [Select]
$category_id = vmGet($_REQUEST, "category_id", null);

$query  = "SELECT DISTINCT m.manufacturer_id
FROM #__{vm}_manufacturer m
WHERE cx.category_id =".(int)$category_id;

$result = mysql_query($query) or die("Anfrage fehlgeschlagen: " . mysql_error());

http://www.acousticsdb.com - room acoustics matters
http://www.webdesignhamburg.net - webdesign aus Hamburg