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

时间:2018-09-15 07:59:43

标签: prestashop

我正在尝试使按钮“提供您的价格”,以打开我的自定义页面“ offer-price.tpl” 。问题是如何通过单击按钮( product-offer-price.tpl )打开我的自定义报价页面? PS版本1.7

OfferPriceController.php:

#First I've ordered the factor with increasing distance 
ndfmat$decreased <- factor(ndfmat$decrease, levels = c("2cm", "12cm", "24cm", "36cm"))
ndfmat$decrease <- NULL`


library(ggplot2) 
ggplot(data=ndfmat, aes(x=ndfmat$decreased, y=ndfmat$val)) +
geom_point() +
geom_smooth()

要约价格.tpl:

<?php

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

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

        $this->setTemplate('offer-price');
    }
}

product-offer-price.tpl:

{extends file=$layout}

product.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>

1 个答案:

答案 0 :(得分:2)

标准方法是创建新模块来实现。