Documentation

Home Page

Overview

Home page merupakan halaman awal dari tema yang kita buat. Di dalam homepage kamu bisa menampilkan informasi berupa:

untuk melihat lebih detail dari helper produk silakan kesini Produk Helper

List Produk

Untuk menampilkan list produk di homepage, kamu bisa menggunakan helper list_product() untuk mengambil produk-produk dari toko tersebut. Contoh cara penggunaannya seperti berikut:

@if(list_product()->count()>0)
    <div class="products_list products_slider">

        <h2 class="sub_title">Produk Baru</h2>

        <ul>

            @foreach(list_product() as $key => $myproduk)

            <li> 

                <a href="{{product_url($myproduk)}}" class="product_image">
                    <img src={{product_image_url($myproduk->gambar1)}}>
                </a>

                <div class="product_info">

                    <h3>
                        <a href="{{product_url($myproduk)}}">{{$myproduk->nama}}</a>
                    </h3>

                    <small>
                        {{short_description($myproduk->deskripsi,100)}}
                    </small>
                </div>

                @if($setting->checkoutType!=2)
                <div class="price_info"> 

                    <a href='' class="price_add" title="" >
                        {{price($myproduk->hargaJual)}}
                    </a>
                </div>

                @endif
            </li>

            @endforeach

        </ul>

    </div>

@endif

Best Seller

Untuk menampilkan informasi produk yang termasuk bestseller, kamu bisa memanggil helper best_seller(). Contoh penggunaanya seperti berikut:

@if(best_seller()->count()>0)
    <div class="products_list products_slider">

        <h2 class="sub_title">Produk Baru</h2>

        <ul>

            @foreach(best_seller() as $key => $myproduk)

            <li> 

                <a href="{{product_url($myproduk)}}" class="product_image">
                    <img src={{product_image_url($myproduk->gambar1)}}>
                </a>

                <div class="product_info">

                    <h3>
                        <a href="{{product_url($myproduk)}}">{{$myproduk->nama}}</a>
                    </h3>

                    <small>
                        {{short_description($myproduk->deskripsi,100)}}
                    </small>
                </div>

                @if($setting->checkoutType!=2)
                <div class="price_info"> 

                    <a href='' class="price_add" title="" >
                        {{price($myproduk->hargaJual)}}
                    </a>
                </div>

                @endif
            </li>
            @endforeach

        </ul>

    </div>

@endif

Featured Produk

Untuk menampilkan informasi produk yang termasuk featured, kamu bisa menggunakan variabel $featured atau dengan memanggil helper best_seller().

@if(featured_product()->count()>0)
    <div class="products_list products_slider">

        <h2 class="sub_title">Produk Baru</h2>

        <ul>

            @foreach(featured_product() as $key => $myproduk)

            <li> 

                <a href="{{product_url($myproduk)}}" class="product_image">
                    <img src={{product_image_url($myproduk->gambar1)}}>
                </a>

                <div class="product_info">

                    <h3>
                        <a href="{{product_url($myproduk)}}">{{$myproduk->nama}}</a>
                    </h3>

                    <small>
                        {{short_description($myproduk->deskripsi,100)}}
                    </small>
                </div>

                @if($setting->checkoutType!=2)
                <div class="price_info"> 

                    <a href='' class="price_add" title="" >
                        {{price($myproduk->hargaJual)}}
                    </a>
                </div>

                @endif
            </li>
            @endforeach

        </ul>

    </div>

@endif

Latest Produk

Untuk menampilkan informasi produk yang terbaru (latest product), kamu bisa menggunakan helper latest_product() .

@if(latest_product()->count()>0)
    <div class="products_list products_slider">

        <h2 class="sub_title">Produk Baru</h2>

        <ul>

            @foreach(latest_product() as $key => $myproduk)

            <li> 

                <a href="{{product_url($myproduk)}}" class="product_image">
                    <img src={{product_image_url($myproduk->gambar1)}}>
                </a>

                <div class="product_info">

                    <h3>
                        <a href="{{product_url($myproduk)}}">{{$myproduk->nama}}</a>
                    </h3>

                    <small>
                        {{short_description($myproduk->deskripsi,100)}}
                    </small>
                </div>

                @if($setting->checkoutType!=2)
                <div class="price_info"> 

                    <a href='' class="price_add" title="" >
                        {{price($myproduk->hargaJual)}}
                    </a>
                </div>

                @endif
            </li>
            @endforeach

        </ul>

    </div>

@endif

Banner

Jika tema kamu mendukung adanya banner, kamu bisa menambahkanya ke dalam homepage tema kamu.

Untuk menampilkan informasi banner di halaman utama atau homepage, kamu bisa menggunakan helper horizontalbanner()untuk memanggil banner horizontal, atauverticalbanner()` untuk memanggil banner vertical. Contoh pemangilan banner seperti berikut:

<h2>Banner</h2>

@foreach(horizontal_banner() as $banner)

    <a target="_blank" href="{{url($banner->url)}}">

        <img src="{{banner_image_url($banner->gambar)}}"/>

    </a>

@endforeach