How to remove Product Specification tab from ajax toolkit on varients in grid page?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 yıl önce
I have added product specifications elsewhere and want to delete the ajax tab product specs however have had little success in removing the correct code.

I no longer want this code however it is being called from the VariantsInGrid.ascx.cs and I have had little success in removing it from this page.

            <ajaxToolkit:TabPanel runat="server" ID="pnlProductSpecs" HeaderText="<% $NopResources:Products.ProductSpecs %>">
                <ContentTemplate>
                    <nopCommerce:ProductSpecs ID="ctrlProductSpecs" runat="server" ></nopCommerce:ProductSpecs>
                </ContentTemplate>
            </ajaxToolkit:TabPanel>

Your comments would be greatly appreciated.

kind regards

DTK
12 yıl önce
Not even a suggestion?
12 yıl önce
For 1.90

To remove the Product Specifications tab from the Variants in Grid product template:

Edit file: Templates\Products\VariantsInGrid.ascx

Delete or comment out (surround with <%-- and --%>) the following code:
<%--<ajaxToolkit:TabPanel runat="server" ID="pnlProductSpecs" HeaderText="<% $NopResources:Products.ProductSpecs %>">
    <ContentTemplate>
        <nopCommerce:ProductSpecs ID="ctrlProductSpecs" runat="server"></nopCommerce:ProductSpecs>
    </ContentTemplate>
</ajaxToolkit:TabPanel>--%>
---

Edit file: Templates\Products\VariantsInGrid.ascx.cs

In the Page_PreRender method, comment out (with // ) or delete the lines that reference pnlProductSpecs (the product specifications tab panel):
protected void Page_PreRender(object sender, EventArgs e)
{
    pnlProductReviews.Visible = ctrlProductReviews.Visible;
    //pnlProductSpecs.Visible = ctrlProductSpecs.Visible;
    pnlProductTags.Visible = ctrlProductTags.Visible;
    ProductsTabs.Visible = pnlProductReviews.Visible ||
        //pnlProductSpecs.Visible ||
        pnlProductTags.Visible;

    //little hack here
    if (pnlProductTags.Visible)
        ProductsTabs.ActiveTab = pnlProductTags;
    //if (pnlProductSpecs.Visible)
    //    ProductsTabs.ActiveTab = pnlProductSpecs;
    if (pnlProductReviews.Visible)
        ProductsTabs.ActiveTab = pnlProductReviews;
}
You will need to recompile the NopCommerceStore project to see the change. Upload, to your web server, the updated versions of  VariantsInGrid.ascx and the assembly: NopCommerceStore.dll (in /bin)

.
12 yıl önce
Thank you this is exactly what I did with the exception to uploading the nopstore.
I did however manage to resolve this by setting the product spec tab to Visibility="false"

Many thanks for your help though its appreciated.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.