Prestashop 如何创建一个打开自定义页面的按钮?

Prestashop 如何创建一个打开自定义页面的按钮?,prestashop,Prestashop,我正在尝试制作一个按钮“报价”,打开我的自定义页面“Offer-price.tpl”。问题是,如何通过单击按钮(product offer price.tpl)打开我的自定义报价页?PS版本1.7 OfferPriceController.php: <?php class OfferPriceControllerCore extends FrontController { public $php_self = 'offerprice'; public $ssl = tru

我正在尝试制作一个按钮“报价”,打开我的自定义页面“Offer-price.tpl”。问题是,如何通过单击按钮(product offer price.tpl)打开我的自定义报价页?PS版本1.7

OfferPriceController.php:

<?php

class OfferPriceControllerCore extends FrontController
{
    public $php_self = 'offerprice';
    public $ssl = true;

    public function initContent()
    {
        parent::initContent();

        $this->setTemplate('offer-price');
    }
}
{extends file=$layout}
<div class="offer">
  <button
  class="btn btn-primary offer-price"
  data-button-action="offer-price"
  type="submit">
    {l s='Offer your price'}
  </button>
</div>
{block name='offer_price'}
     {include file='catalog/_partials/product-offer-price.tpl'}
{/block}
产品报价。第三方物流:

<?php

class OfferPriceControllerCore extends FrontController
{
    public $php_self = 'offerprice';
    public $ssl = true;

    public function initContent()
    {
        parent::initContent();

        $this->setTemplate('offer-price');
    }
}
{extends file=$layout}
<div class="offer">
  <button
  class="btn btn-primary offer-price"
  data-button-action="offer-price"
  type="submit">
    {l s='Offer your price'}
  </button>
</div>
{block name='offer_price'}
     {include file='catalog/_partials/product-offer-price.tpl'}
{/block}

标准方法是创建新模块来完成此操作。

标准方法是创建新模块来完成此操作