How Can We Help?

Plumrocket Who Bought This Also Bought 模組修改版型

You are here:
< All Topics

Plumrocket Who Bought This Also Bought 是付費模組,可以完美與 Ultimo 樣版結合

安裝後為了與 Magento Also Viewed Products 搭配,所以需要做一些細部修改

客製化

修改 “Who Bought This Also Bought:” 標題大小

預設標題是用 CSS 控制,因為大小與 Also Viewed Products 不同,所以請原廠協助修改

編輯 /app/design/frontend/ultimo/default/template/plwhobought/product.phtml

vim /usr/share/nginx/html/app/design/frontend/ultimo/default/template/plwhobought/product.phtml

將第 122 行

<h3 class="section-title padding-right"><?php echo $this->__('Who Bought This Also Bought:'); ?></h3>

修改為

<h2 class="padding-right"><?php echo $this->__('Who Bought This Also Bought:'); ?></h2>

編輯後記得刷新 OPCache

修改圖片尺寸

圖片預設值為 196px,無法由後台直接修改,必須直接編輯檔案

編輯 /app/design/frontend/ultimo/default/template/plwhobought/product.phtml

vim /usr/share/nginx/html/app/design/frontend/ultimo/default/template/plwhobought/product.phtml

將第 67 行

 $imgWidth = 196; //Set default value

修改為

 $imgWidth = 220; //Set default value

編輯後記得刷新 OPCache

Product Grid 只顯示單行產品名稱

Ultimo 樣版有這個功能,啟用後產品名稱與價格會很漂亮的對齊

但是 Also Bought 模組並不支援這項功能,請原廠協助之後,在 下套入 Ultimo 的 single-line-name

編輯檔案

vim /usr/share/nginx/html/app/design/frontend/ultimo/default/template/plwhobought/product.phtml

將第 124 行

    <div id="<?php echo $sliderId; ?>" class="itemslider<?php if($sliderClasses) echo $sliderClasses; ?> products-grid<?php if($gridClasses) echo $gridClasses; ?>">

修改為

    <div id="<?php echo $sliderId; ?>" class="itemslider<?php if($sliderClasses) echo $sliderClasses; ?> products-grid<?php if($gridClasses) echo $gridClasses; ?> single-line-name">

修改完成後,清除 OPCache,就可以發現改變囉!

顯示的資訊精簡化

每個產品預設會顯示這六項資訊

  • 圖片
  • 產品名稱
  • 價格
  • 購買按鈕
  • 加入收藏
  • 加入比較

會了美化頁面,我們只想要顯示這三項資訊

  • 圖片
  • 產品名稱
  • 價格

編輯檔案

vim /usr/share/nginx/html/app/design/frontend/ultimo/default/template/plwhobought/product.phtml

將第 145 行

                <?php //Add-to links

修改為

                <?php /* //Add-to links

將第 160 行

                ?>

修改為

                */ ?>

將第 169 行

 <div class="actions">

之前加入一行

<?php /*

並將第 191 行插入新行

 */ ?>

修改完成後,清除 OPCache,就可以發現改變囉

 

錯誤修正

實際進行翻譯後,發現翻譯檔無法順利套用

原廠協助修正後發現檔案並沒有把檔案位置寫進去,必須更新檔案

修改完成後,清除 OPCache,就可以發現改變囉!

 

Table of Contents