【问题标题】:Prestashop - how to create a button that opens custom page?Prestashop - 如何创建一个打开自定义页面的按钮?
【发布时间】:2018-09-15 18:10:36
【问题描述】:

我正在尝试制作一个“提供您的价格”按钮来打开我的自定义页面'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');
    }
}

offer-price.tpl:

{extends file=$layout}

product-offer-price.tpl:

<div class="offer">
  <button
  class="btn btn-primary offer-price"
  data-button-action="offer-price"
  type="submit">
    {l s='Offer your price'}
  </button>
</div>

product.tpl:

{block name='offer_price'}
     {include file='catalog/_partials/product-offer-price.tpl'}
{/block}

【问题讨论】:

    标签: prestashop


    【解决方案1】:

    标准方法是创建新模块来执行此操作。

    【讨论】:

      猜你喜欢
      • 2012-12-29
      • 1970-01-01
      • 2016-05-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-11-26
      • 2016-09-28
      • 2012-08-01
      相关资源
      最近更新 更多