Add other links to VirtueMart Category Module?

Before you ask about IDnR Addon see the VirtueMart - Invoice, Delivery Note and Receipt Addon
dougevans
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 09 Sep 2014, 19:49

Add other links to VirtueMart Category Module?

Post by dougevans » 09 Sep 2014, 20:00

Hi. First, thank you for ALL of your hard work, very appreciated.

Is there any way to add additional links to the dynamically created VirtueMart Category Module menu? I would like to add something like Contact Us and About Us pages. I also want to hard code a section that would have some drop downs (secondary levels) in it.

So far, all I can do is add it in the code by creating a second <ul id="pvmc-menu"> but it acts funny when the page is smaller and is not quite responsive. The items need to be included in the original <ul id="pvmc-menu"> but I cannot figure out where to put my hardcoding within your php script. Any help would be GREATLY appreciated!

If you need a live example, please just let me know and I will create one.

Thank you in advance,
Doug Evans

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42491
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Add other links to VirtueMart Category Module?

Post by Jan » 09 Sep 2014, 21:52

Hi, no there is no such option, so this needs to be customized directly in the code.

To have it more responsive, I think, the fixed sizes (in the parameters or in the html code) needs to be set e.g. to percentage values :idea:

Jan
If you find Phoca extensions useful, please support the project

dougevans
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 09 Sep 2014, 19:49

Re: Add other links to VirtueMart Category Module?

Post by dougevans » 10 Sep 2014, 16:14

Hi Jan,

Thanks for the reply. The problem with the responsiveness is that the menu divides where the second <ul id="pvmc-menu"> is created.

I know that I need to do this by adding directly to the code so I just need a little direction. Right now I am adding all of my extra code here:

Code: Select all

echo '<div id="pvmc-wrap">' . "\n";
PhocaVmCategoryTree ($category_id, $vendorId, $cache, $categoryModel, $p);
echo  '<ul id="pvmc-menu">' . "\n";
echo  '<li class="level0 parent"><a href="index.php?option=com_jphoto&view=category&Itemid=330" class="drop">Photo Gallery</a>
<ul style="width: 135px;" class="level1 child pvmc-submenu">
<li style="width: 120px; position: relative; float: left; padding: 0px 5px;" class="level1"><a href="index.php?option=com_jphoto&view=gallery&id=1&Itemid=330">Corporate Events</a>
</li>
<li style="width: 120px; position: relative; float: left; padding: 0px 5px;" class="level1"><a href="index.php?option=com_jphoto&view=gallery&id=2&Itemid=330">Private Parties</a>
</li>
<li style="width: 120px; position: relative; float: left; padding: 0px 5px;" class="level1"><a href="index.php?option=com_jphoto&view=gallery&id=3&Itemid=330">Weddings</a>
</li>
<li style="width: 120px; position: relative; float: left; padding: 0px 5px;" class="level1"><a href="index.php?option=com_jphoto&view=gallery&id=5&Itemid=330">New Items</a>
</li>
</ul>

</li>' . "\n";
		echo  '<li class="level0"><a href="index.php?option=com_content&view=article&id=54&Itemid=331">About Us</a>' . "\n";
		echo  '<li class="level0"><a href="index.php?option=com_rsform&view=rsform&formId=4&Itemid=110">Contact</a>' . "\n";
		echo  '</ul>'."\n\n";
echo '</div></div>';
echo '<div style="margin-bottom: 10px;clear:both;"> </div>';


Right after calling the function. But all I can do at that point is create another <ul id="pvmc-menu">.

Where does the script end when all of the menu categories are dynamically created? Could you tell me where in the function, that I could add the extra scripting please? I have tried several things and cannot figure it out.

Thanks again for any help,
Doug Evans

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42491
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Add other links to VirtueMart Category Module?

Post by Jan » 10 Sep 2014, 21:59

Hi, you should just add every modification directly to the php code of the module:

mod_phoca_vm_category.php

Jan
If you find Phoca extensions useful, please support the project

dougevans
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 09 Sep 2014, 19:49

Re: Add other links to VirtueMart Category Module?

Post by dougevans » 10 Sep 2014, 23:05

Hi Jan,

Yes, that is exactly what I am trying to do. I have been adding it right after the line that calls the function:
PhocaVmCategoryTree ($category_id, $vendorId, $cache, $categoryModel, $p);

But I am finding out that to get the results I want, I need to add it within the function itself. Can you tell me where I should add the extra code within the actual function?

Thanks again for your reply and help,
Doug Evans

User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 42491
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Add other links to VirtueMart Category Module?

Post by Jan » 15 Sep 2014, 15:58

Hi, yes, I think, the best way is to add it to the function, I don't have the code now, but I think, there is some foreach, so this needs to be set there :idea:

Jan
If you find Phoca extensions useful, please support the project

Post Reply