VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: sahar-onyx on July 28, 2014, 08:22:31 AM

Title: what's link code to category in mod_sot_vm_thumbnail-slider
Post by: sahar-onyx on July 28, 2014, 08:22:31 AM
hello

I want create a text for link to one category. i try use this code:

JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_category_id='.$category->virtuemart_category_id);

but not working

Sorry for English language weak

please help me
Title: Re: what's link code to category in mod_sot_vm_thumbnail-slider
Post by: GJC Web Design on July 28, 2014, 10:15:48 AM
And what doesn't work about it? What url does it produce?
Title: Re: what's link code to category in mod_sot_vm_thumbnail-slider
Post by: sahar-onyx on July 28, 2014, 11:17:47 AM
Thank you for the answer

url:     domain/index.php?option=com_virtuemart&view=category&virtuemart_category_id=

Does not produce any id number for category

if type

<?php echo $category->virtuemart_category_id?>

Does not show anything

Title: Re: what's link code to category in mod_sot_vm_thumbnail-slider
Post by: GJC Web Design on July 28, 2014, 11:25:04 AM
assume from the post title it is in this module?

mod_sot_vm_thumbnail-slider

this knows nothing about VM so of course $category->virtuemart_category_id is meaningless

you have to include all the VM base files etc so the $category var means something via the model

wouldn't it be far simpler to make a manual config of the catids in the module xml?
Title: Re: what's link code to category in mod_sot_vm_thumbnail-slider
Post by: sahar-onyx on July 28, 2014, 11:33:34 AM
You are right

I do not know how I should connect the slider variables  to the variables based virtuemart
I found the answer and put in this post

Thank you
Title: Re: what's link code to category in mod_sot_vm_thumbnail-slider
Post by: sahar-onyx on July 28, 2014, 11:40:45 AM
There are this field in mod_sot_vm_thumbnail_slide.xml file

<field name="virtuemart_category_id" type="vmcategories"  value_field="category_name" label="Virtuemart Category" description="Select Category" />

How should I use virtuemart_category_id  that is Available at this file?

Title: Re: what's link code to category in mod_sot_vm_thumbnail-slider
Post by: GJC Web Design on July 28, 2014, 11:50:01 AM
you have to ask who ever made the module - normally it's a comma separated list of catids (that's how I would do it)
Title: Re: what's link code to category in mod_sot_vm_thumbnail-slider
Post by: sahar-onyx on July 31, 2014, 08:26:00 AM
I have 4 module " mod_sot_vm_thumbnail-slider " that Each of modules showing product of one category. now I want create link " show all product " in each module.

How do I it?

Sorry if I do not explain it

Please Help me
Title: Re: what's link code to category in mod_sot_vm_thumbnail-slider
Post by: GJC Web Design on July 31, 2014, 10:04:04 AM
This is not a help forum for other peoples modules.. ask the guy that made the module or you need to learn some coding...