prestashop - PrestaShop $link ->getProductLink($product) 给出不正确的 URL
问题描述
我正在使用自定义 ajax 驱动模块生成我的产品链接$link -> getProductLink($product)
它正在生成一个类似http://example.com/prestashop/2-blouse.html的 URL
这是抛出一个错误说
[调试] 此页面已移动 请改用以下 URL: http ://example.com/prestashop/blouses/2-blouse.html
如何避免在 config/defines.inc.php 中将 _PS_MODE_DEV_ 设置为 false 的情况。
谢谢
PS:我正在使用 prestashop 1.7
解决方案
试试这个(免费)模块。
但是为了解决你的问题{$link->getProductLink($smarty.get.id_product, $smarty.get.id_product.link_rewrite)|escape:'htmlall':'UTF-8'}
推荐阅读
- c - 如何使 printf 中的文本出现在 C 中的 scanf 之后?
- sql - SSIS 作业失败 - 拒绝访问平面文件
- c - 从 Int 10h/AX=4F00h 检索 VESA 视频模式列表
- swift - 如何用 CLLocationDegrees 解决这个问题?
- java - 通过在 java 中设置 cookie 进行身份验证,在浏览器中打开网页
- email - 邮件客户端发件人图片
- ios - 应用旋转为横向和纵向,但不会倒置旋转
- codeblocks - code::blocks 不会将我的设置保存为默认设置
- r - 组合两个相同/不同名称的数据框
- java - 在 java play scheduler 任务中注入一个类实例