We understand that your ecommerce site is crucial to the success of your business, from time to time issues and questions can arise and you need to have the assurance there will be someone on hand to help resolve these in a timely fashion so you can spend your time driving your own business forward.

So if you are looking for faster responses to your questions or would like the assurance there is someone on hand for you to contact, fear not we have a number of paid support options that are available to you that can give your organisation the peace of mind knowing a member from the Cart Viper team will always be available to assist!

Purchase a Support Plan

Community Support

HomeHomeIssues and Supp...Issues and Supp...Templates & UITemplates & UIDisplay all category in ProductDetail.htmDisplay all category in ProductDetail.htm
Previous
 
Next
New Post
5/30/2017 12:00 PM
 
Hi, i want to display in product detail all categories i selected i tried to search a token in the guide pdf but i don't find it.

Can you help me?
Thanks Daniele
 
New Post
5/30/2017 1:46 PM
 
Hi,

Although we don't have a specific token for that as our templates support Razor scripts it is possible todo. 

1) Download this file and rename it to ProductCategories.cshtml

2) Place the downloaded file into the template "scripts" folder, if you check in store admin -> store info we should output your stores template folder location.

3) Modify ProductDetail.htm to include [RAZOR:ProductCategories.cshtml] where you would like the categories outputted.

The Razor script will just output the categories assigned to the current product as an un-ordered list but you can change that as per your needs.
 
New Post
7/11/2017 12:33 PM
 
Hi,
it's ok but now I need to get image for all categories.
I tried with item.categoryImage in your solution but didn't work

Can you help me?

Thanks Daniele
 
New Post
7/11/2017 3:18 PM
 
Hi,

To output the category image you would need to update the script as per the below:

@using System.Dynamic; 
@using CartViper.Modules.Store.Catalog; 
@using CartViper.Modules.Store.Catalog.Templates;
@using DotNetNuke.Common;
@using CartViper.Modules.Store.Admin;
@using CartViper.Modules.Store.WebControls;
@using System.Web.UI.HtmlControls;
@using CartViper.Modules.Store.Extensions;
@using System.Linq;

@inherits DotNetNuke.Web.Razor.DotNetNukeWebPage<dynamic>

@{
    if (Model.Product != null && Model.Product.Categories().Count > 0)
    {
var storeInfo = new StoreController().GetStoreInfo(Dnn.Portal.PortalId);
@:<ul>

foreach (CategoryInfo item in Model.Product.Categories())
        {
string imageUrl = item.ScaledImageUrl(storeInfo.CategoryImageWidth,
                                                      Dnn.Portal.PortalId,
                                                      true);
 
var nav = new CatalogNavigation();
nav.CategoryID = item.CategoryID;
if(item.CategoryPageId.HasValue && item.CategoryPageId.Value > 0){
nav.TabId = item.CategoryPageId.Value;
}else{
nav.TabId = storeInfo.StorePageID;
}

@:<li>
@:<p><a href="@nav.GetNavigationUrl()">@item.CategoryName</a></p>
@:<p><img src="@Globals.ResolveUrl(imageUrl)" alt="@item.CategoryName" />
@:</li>

}

@:</ul>
    }
}
 
New Post
7/13/2017 3:43 PM
 
Ok, but what if I don't want to resize img and i want the original image url?
 
Previous
 
Next
HomeHomeIssues and Supp...Issues and Supp...Templates & UITemplates & UIDisplay all category in ProductDetail.htmDisplay all category in ProductDetail.htm


 

We use cookies on our website to improve our service to you, by continuing you agree to our use of cookies. However you are able to update your settings at any time.

Cookie Policy

A cookie, also known as an HTTP cookie, web cookie, or browser cookie, is a piece of data stored by a website within a browser, and then subsequently sent back to the same website by the browser. Cookies were designed to be a reliable mechanism for websites to remember things that a browser had done there in the past, which can include having clicked particular buttons, logging in, or having read pages on that site months or years ago.

Strictly Necessary Cookies

These cookies cannot be disabled

These cookies are necessary for the website to function and cannot be switched off. They are normally set in response to your interactions on the website e.g. logging in etc.

Cookies:
  • .ASPXANONYMOUS
  • .DOTNETNUKE
  • __RequestVerificationToken
  • authentication
  • CV_Portal
  • CV_Store_Portal_Cart_0
  • CV_USER
  • dnn_IsMobile
  • language
  • LastPageId
  • NADevGDPRCookieConsent_portal_0
  • userBrowsingCookie

Performance Cookies

These cookies allow us to monitor traffic to our website so we can improve the performance and content of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited or how you navigated around our website.

Cookies:
  • _ga
  • _gat
  • _gid

Functional Cookies

These cookies enable the website to provide enhanced functionality and content. They may be set by the website or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.

Cookies:

Currently we are not utilizing these types of cookies on our site.

Targeting Cookies

These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.

Cookies:

Currently we are not utilizing these types of cookies on our site.

Feedback