Doh...nevermind....I figured it out..
I was editing the MegaMenu.cshtml in the MegaMenu/Views root...instead of the one in the MegaMenu/Themes/Alfresco/Views/ folder...
I've had no trouble adding additional links to the megamenu in the past, but it seems a little different with version 3.10.
I have a topic page with a systemname of "Learn", and I added this following code to my megamenu.cshtml expecting a new menu item to appear saying "Learn."
@{
MvcHtmlString learnTopicBlock = Html.Action("TopicBlock", "MegaMenu", new { systemName = "Learn" });
}
<li>@learnTopicBlock</li>
<li><a href="@Url.RouteUrl("Topic", new { SystemName = "Learn" })">@T("Learn")</a></li>
<div class="product-variant-list"> @foreach (var variant in Model.ProductVariantModels) { dataDictVariant.TemplateInfo.HtmlFieldPrefix = string.Format("variant_{0}", variant.Id); @Html.Partial("_ProductVariantLine", variant, dataDictVariant) } </div>
@if (Model.ProductVariantModels.Count > 1)
{
/*display drop down with variants*/
<div class="product-variant-list">
@Html.DropDownList("ddlProductVariants", new SelectList((from variant in Model.ProductVariantModels select new { IdValue = variant.Id, TextValue
= variant.Name + " - " + variant.ProductVariantPrice.Price }),"IdValue", "TextValue"), "Available Options", new { @onchange = "$('div.add-to-cart').hide();var
e=document.getElementById('ddlProductVariants');var idValue = e.options[e.selectedIndex].value;$('div[id=addtocart_'+idValue+']').show();" }) @foreach (var variant in
Model.ProductVariantModels) { var dataDictAddToCart = new ViewDataDictionary(); dataDictAddToCart.TemplateInfo.HtmlFieldPrefix =
string.Format("addtocart_{0}", variant.Id); @Html.Partial("_ProductVariantAddToCart", variant.AddToCart, dataDictAddToCart) } </div>
}
else
/* just display quantity input and add item button*/
{
<div class="product-variant-list">
@foreach (var variant in Model.ProductVariantModels)
{
var dataDictVariant = new ViewDataDictionary();
dataDictVariant.TemplateInfo.HtmlFieldPrefix = string.Format("variant_{0}", variant.Id);
@Html.Partial("_ProductVariantLine", variant, dataDictVariant)
}
</div>
}
<div class="add-to-cart">
<div class="add-to-cart" id="@string.Format("addtocart_{0}", Model.ProductVariantId)" style="display: none">
-moz-transition: display 1s linear;
-webkit-transition: display 1s linear;
transition-delay: 2s; /* IE 10 */
-moz-transition-delay: 2s; /* Firefox 4 */
-webkit-transition-delay: 2s; /* Safari and Chrome */
-o-transition-delay: 2s; /* Opera */
-moz-transition: display 1s linear;
-webkit-transition: display 1s linear;
Hello-
I've looked through the megamenu plugin folder and don't see any javascripts controlling the drop down behavior, so I am assuming that it is all done within the dll.
What I'd like to do is cause a delay in the menu drop down so that it requires the cursor be over the menu for at least one second before expanding. If I cannot accomplish that, would it be possible to change to use an onclick type event rather than the onmouseover it does by default?
Thanks,
Steve
Hello-
I am wondering if anyone else has needed to modify the way that products with multiple variants are displayed on the catalog product pages.
When I have a product that is available in 4 different colors, and each of those colors is available in 12 different sizes, and I set the product to use the VariantsinGrid template...the length of the page is REDICULOUS due to the amount of space that each variant takes up.
Ideally, I'd like to use the SingleVariant template because I like where the add item button is located on the page...but I'd also like to display two drop down boxes..one for color and one for size...with all of the possible options in those drop downs.
Does something like this already exist?...Is it even possible to achieve?... If so....where/how??
Thanks!
Steve