如何在 Nopcommerce 中覆盖视图? [英] How to Override View in Nopcommerce?

查看:65
本文介绍了如何在 Nopcommerce 中覆盖视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 nopCommerce 中的数据访问和小部件创建一个插件.

I am creating one plug-in using data-access and widget in nopCommerce.

因为我已经创建了我想通过替换(覆盖)Product-Image & 在 ProductDetails 页面上显示的小部件.它的拇指.

In that i have created my widget that i want to display on ProductDetails Page by replacing (overriding) Product-Image & its thumbs.

但我不知道如何覆盖视图,甚至不知道是否可以在 nopCommerce 中使用.

But i don't know how to override views and even don't know is it possible in nopCommerce or not.

请谁能帮帮我.

如果可能,请提供一个示例,以便我能够真正理解它在 nopcommerce 中的覆盖方式.

If possible please provide an example as well, so that i can understand actually how it overrides in nopcommerce.

推荐答案

您可以使用自定义主题(而非插件)覆盖视图.

You can override views using custom themes (not plugins).

例如,要覆盖产品详细信息页面,请将适当的 cshtml 文件复制到 \Themes\{YourThemeName}\Views\Catalog\{YourProductTemplateFile.cshtml} 中,然后自定义满足您的需求.

For example, to override product details page, copy appropriate cshtml files into \Themes\{YourThemeName}\Views\Catalog\{YourProductTemplateFile.cshtml} and then customize it for your needs.

这篇关于如何在 Nopcommerce 中覆盖视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆