Prestashop 显示特定的价格规则信息
我需要在我的Prestashop网站上显示一个组的具体价格百分比规则,但我找不到它的类。我可以用代码显示组的折扣百分比:Prestashop 显示特定的价格规则信息,prestashop,Prestashop,我需要在我的Prestashop网站上显示一个组的具体价格百分比规则,但我找不到它的类。我可以用代码显示组的折扣百分比: {if $customer.is_logged} {*$customerGroups|@print_r*} {if Group::getCurrent()->reduction} <p class="discount"></i> Discount: {Group::get
{if $customer.is_logged}
{*$customerGroups|@print_r*}
{if Group::getCurrent()->reduction}
<p class="discount"></i> Discount: {Group::getCurrent()->reduction|string_format:"%d"}%</p>
{/if}
{/if}
{if$customer.is_logged}
{*$customerGroups |@print_r*}
{if Group::getCurrent()->reduction}
折扣:{Group::getCurrent()->reduction | string_格式:“%d”}%
{/if}
{/if}
谢谢首先,最好将此逻辑移到模块中,并使用某种自定义挂钩或小部件。风景不是这种东西的地方 您可以使用此方法检索所需的任何
SpecificPrice
:
SpecificPrice::getSpecificPrice
因此,基本上您可以连接到displayProductAdditionalInformation
并执行以下操作:
$specificPrice = SpecificPrice::getSpecificPrice(
$this->context->controller->getProduct()->id,
$this->context->shop->id,
$this->context->currency->id,
$ID_OF_THE_GROUP
);
dump($specificPrice);
看看你得到了什么:)