• Register
Plug-in Tutorial Build an EC-CUBE plug-in

Top Commentators

114

1

EC Mike

SHOGUNSHOGUN

32

2

hrbabu

SAMURAISAMURAI

29

3

Sumant Jha

SAMURAISAMURAI

29

4

justcubed

SAMURAISAMURAI

21

5

Ashok Kafle

SAMURAISAMURAI

21

6

shahith

SAMURAISAMURAI

14

7

Jeemusu

KABUKIKABUKI

14

8

Yangsin

KABUKIKABUKI

9

9

Zaw Hlaing Bwar

GEISYAGEISYA

8

10

Fei Liu

GEISYAGEISYA

Ranking Key

  • FUJISANFUJISAN1,000+ posts
  • SAKURASAKURA500+ posts
  • SHOGUNSHOGUN100+ posts
  • NINJYANINJYA50+ posts
  • SAMURAISAMURAI20+ posts
  • KABUKIKABUKI10+ posts
  • GEISYAGEISYALess than 10 posts

How to add more property to product infomation

+1 vote
I want to use multi image for 1 product in Ec-Cube.

I don't know does Ec-cube support to add plugin or module to back-end? (Upload more image when i create product).

Thanks
asked 2014-05-29 by ngminhduong (130 points) GEISYAGEISYA
edited 2014-05-29 by ngminhduong

1 Answer

0 votes
Yes, ec-cube has additional 6(six) sub-image option in its database table dtb_products. You can create additional image upload option in "data/Smarty/templates/admin/products/product.tpl" file and create view option in "data/Smarty/templates/default_en-US/products/detail.tpl" file. Code below shows one main image and three additional images:

<div id="cart_area">
    <h2 class="cart" align="center"><span class="title">Product Images</span></h2>
     </div>
        
      <table border="0" align="center">
                <tr>
            <!--{if $arrProduct.sub_image1|h != ""}-->
                    <td>
              <!--{if $arrProduct.main_image|h == ""}-->
              <a tabindex="1"><img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}-->noimage_main.png" width="<!--{$arrFile[$key].width}-->" height="<!--{$arrFile[$key].height}-->"/>
              <!--{else}-->
              <a tabindex="1"><img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.main_image|h}-->"</a>
              <!--{/if}-->
          </td>
            <!--{/if}-->
            <!--{if $arrProduct.sub_image1|h != ""}-->
                    <td>
              <!--{if $arrProduct.sub_image1|h == ""}-->
              <a tabindex="1"><img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}-->noimage_main.png" width="<!--{$arrFile[$key].width}-->" height="<!--{$arrFile[$key].height}-->"/>
              <!--{else}-->
              <a tabindex="1"><img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.sub_image1|h}-->"></a>
              <!--{/if}-->
          </td>
            <!--{/if}-->
            <!--{if $arrProduct.sub_image2|h != ""}-->
                    <td>
              <!--{if $arrProduct.sub_image2|h == ""}-->
              <a tabindex="1"><img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}-->noimage_main.png" width="<!--{$arrFile[$key].width}-->" height="<!--{$arrFile[$key].height}-->"/>
              <!--{else}-->
              <a tabindex="1"><img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.sub_image2|h}-->"></a>
              <!--{/if}-->
          </td>
            <!--{/if}-->
            <!--{if $arrProduct.sub_image3|h != ""}-->
                    <td>
              <!--{if $arrProduct.sub_image3|h == ""}-->
              <a tabindex="1"><img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}-->noimage_main.png" width="<!--{$arrFile[$key].width}-->" height="<!--{$arrFile[$key].height}-->"/>
              <!--{else}-->
              <a tabindex="1"><img src="<!--{$smarty.const.IMAGE_SAVE_URLPATH}--><!--{$arrProduct.sub_image3|h}-->"</a>
              <!--{/if}-->
          </td>
            <!--{/if}-->
        </tr>
    </table>

I think, it will be helpful to you.
answered 2014-06-02 by hrbabu (1,680 points) SAMURAISAMURAI
...