我想更改现有的prestashop模块而不复制它并创建新模块.我知道可以在prestashop中覆盖.tpl文件,但是可以用php类做同样的事情吗?例如,我想更改blockcart,以便它可以挂在顶部.由于原始版本没有那个钩子我需要更改install()函数!我不能改变原始来源(这不是坏主意......)文件我需要通过继承blockcart模块来覆盖install()函数.有可能这样做,我可以在哪里找到例子吗?
我一直在使用PHP一段时间,但对Smarty来说却相当新.
我正在使用Prestashop,我注意到Smarty似乎吃掉了所有PHP错误 - 当PHP代码出错时,.tpl文件只输出一个空白页面.我一直在尝试,但即使出现错误,我也无法让Smarty显示PHP代码输出.
PHP错误报告设置为显示错误.
所以,举个例子,假设这是example.php文件:
<?php
//included classes etc go here, irrelevant for this issue
error_reporting(E_ALL ^ E_NOTICE);
echo obvious wrong syntax"
?>
Run Code Online (Sandbox Code Playgroud)
此文件连接到example.tpl,它适合模板块中的输出.
显然,它应该抛出一个错误.如何让Smarty实际显示该错误?
我在Prestashop模块中遇到了以下行:
Logger::addLog('2: md5 string is '.$md5HashData, 1);
Run Code Online (Sandbox Code Playgroud)
日志保存在哪里?
如何修改PrestaShop 1.5以同时显示两种货币的产品价格(即产品和类别页面中列出的产品的基本货币和访客货币):

我想我应该修改ProductController.php和product.tpl.它是否正确?
以下是我在论坛上找到的产品页面的一个解决方案,但它适用于PrestaShop 1.4x:
覆盖/controllers/ProductController.php中的ProductController.php
<?php
class ProductController extends ProductControllerCore{
public function displayContent() {
global $currency;
$second_currency = 'USD';
$productPriceWithTax = Product::getPriceStatic($this->product->id, true, NULL, 6);
if (Product::$_taxCalculationMethod == PS_TAX_INC) {
$productPriceWithTax = Tools::ps_round($productPriceWithTax, 2);
}
$productPriceWithoutEcoTax = (float)($productPriceWithTax - $this->product->ecotax);
$current_currency = $currency->iso_code;
$default_currency = Currency::getDefaultCurrency()->iso_code;
$currency_array = Currency::getCurrencies($object = false, $active = 1);
if ($current_currency == $default_currency) {
foreach ($currency_array as $arr) {
if ((string)$arr['iso_code'] == $second_currency) {
$second_currency_price = Tools::ps_round($productPriceWithoutEcoTax * (float)$arr['conversion_rate'], 2); …Run Code Online (Sandbox Code Playgroud)我有http://example.com/index.php作为我的主页.我的类别页面网址是http://example.com/index.php?id_category=10&controller=category
现在,我需要将我的主页重定向到Category Page.我尝试在首选项> SEO和URL的>设置商店URL>基本URI作为index.php?id_category = 10&controller = category
现在,该页面正在重定向到我的类别URL,但页面未打开.网址显示如下 http://example.com/index.php?id_category=10&controller=category/index.php?
使用新版本的Prestashop 1.5.2.0.我想将订单参考(字母)更改为字母数字值.我尝试在论坛中搜索并看到这个论坛.不幸的是它不适合我.
任何人都可以使用解决方案将订单参考(字母)更改为整个应用程序中的字母数字值.
我的意思是"AQMKATRQG"到"LD1001"并将它增加到"LD1002"我想将Order参考(字母)改为字母数字值.我尝试在论坛中搜索并看到这个论坛.不幸的是它不适合我.
任何人都可以使用解决方案将订单参考(字母)更改为整个应用程序中的字母数字值.
我的意思是"AQMKATRQG"到"LD1001"并将其增加到"LD1002"
我已将prestashop 1.5.6电子商务网站迁移到新服务器,
我做的过程只是将文件上传到新服务器并导入数据库.
我清理了Cache/smarty/compile和Cache/smarty/cache文件夹并离开了index.php文件.
我尝试从Preferences/images页面重新生成缩略图,但没有工作,并给出了"内部服务器错误".
我在/etc/httpd/conf.d/fcgid.conf中将进程配置更改为FcgidBusyTimeout 3600
我再次尝试重新生成,这一次,它给了:/ img/p/1/2/xxx中找不到原始图像,但实际上我的所有图像都在/img/p/xxxx.png
我尝试使用"首选项/图像"页面中的"将图像移动到新图像结构"功能,它创建了结构,但现在找不到1400多张图像!
任何帮助都会受到欢迎!
更新时间:2014年6月27日在找到并尝试不同的解决方案48小时后,我失去了希望,将版本还原为商店的备份副本,而不再管理商店.失去了客户..
我在将这个轮播添加到我的prestashop模板时遇到了麻烦.
它返回以下错误:
TypeError:$(...).owlCarousel不是函数导航:true
用于初始化它的代码就是这个
$(document).ready(function() {
$("#owl-demo").owlCarousel({
navigation : true
});
});
Run Code Online (Sandbox Code Playgroud)
我试图解决它,但似乎是不可能的,因为在一个空的html页面上它可以工作,但不是当我在Prestashop上使用它时.
任何线索?
谢谢.
我们正面临亚马逊EC2和Prestashop的严重问题.
我们使用Amazon Elastic Beanstalk部署了Prestashop,并为媒体服务器设置了S3.当我们使用csv导入功能批量上传带有图像的产品时,我们面临以下问题.
新的EC2实例正在创建并丢失所有css和js文件(缓存),并且数据库中的媒体服务器正在清空.由于这一点,我们需要生成所有的css和js文件并每次都上传到S3服务器,因为之前生成的css和js现在是无用的.
下载图像时,如果创建了新的EC2实例,则也会丢失图像.
请帮助我们更好地解决上述问题.
最好的祝福,
为了使用Prestashop,我尝试在本地服务器上安装PHP intl扩展。
我添加extension=php_intl.so到etc/php.ini
当我尝试安装Prestashop时,我得到了Intl extension is not loaded。
当我这样做时$ php -m | grep intl,我得到:
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/local/lib/php/pecl/20160303/php_intl.so' - d
lopen(/usr/local/lib/php/pecl/20160303/php_intl.so, 9): image not found in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/pecl/20160303/php_intl.so' - dlopen
(/usr/local/lib/php/pecl/20160303/php_intl.so, 9): image not found in Unknown on line 0
intl
似乎该文件php_intl.so不存在。 …
prestashop ×10
php ×4
amazon-ec2 ×1
amazon-s3 ×1
function ×1
intl ×1
javascript ×1
jquery ×1
logging ×1
module ×1
smarty ×1