Ejemplo n.º 1
0
    // Global check
    $dbconf = getDbData($imSettings['ecommerce']['database']['id']);
    $prefix = $imSettings['ecommerce']['database']['table'];
    $pagination_length = 15;
    $pagination_start = isset($_GET['page']) ? $_GET['page'] * $pagination_length : 0;
    $ecommerce = new ImCart();
    // Clean the temp files
    $ecommerce->deleteTemporaryFiles("../");
    if ($ecommerce->setDatabaseConnection($dbconf['host'], $dbconf['user'], $dbconf['password'], $dbconf['database'], $prefix)) {
        // ecommerce connection
        /*
        		|-----------------------------
        		|	Show the  table
        		|-----------------------------
        */
        $results = $ecommerce->getDynamicProductsAvailabilityTable(0, 0);
        if (count($results)) {
            // Available data
            foreach ($results as $category => $data) {
                ?>
	<div class="store-product-category"><?php 
                echo $category;
                ?>
</div>
				<?php 
                for ($i = 0; $i < count($data); $i++) {
                    ?>
<div class="store-product-card">
	<div class="store-product-card-image" data-bg-image="<?php 
                    echo $data[$i]['image'];
                    ?>