427 comments found

I have problems with DateTime, the hour drag effect doesn’t work, the square stay stoped. Only the button “Now” and button “Done” works.What can I do to make this work?

ninebit

hm, problem in uor demo page? I dont understand “Hour drag effect”.. please be descriptive. you can write us an link, or screenshot, or you can write us at nine.bit.studio@gmail.com

any way to add filters to the top of home page ? price filter ? sort filter? for example getsy.info .. please take some ideas from :) any way to add google ads in a place of one pin ? in the home page ? thank you

Default-user

+anyway to make the page go to top after “add to cart” ?

ninebit

hmmm, at this time theme has not this features, but I think it is possible with php knowledge

pinless Purchased

hi sir, when my product exceed 40 items in one Category, the additional item at 41, 42, 43… will appear twice in that category, how to solve such problem.

besides, I intermittent getting Internal Server Error while browsing and insert product to pinshop, my hosting provider said it eat up 512MB virtual memory constantly… please show me how to optimize your theme so it wont cause the problem. Its a nice theme after all…

thank you for your help….

ninebit

hello, I send you an mail.

Default-user
pinless Purchased

Hi ninebit, i send you the print screen please check. it still showing twice the item in one category and showing multiple times in home page. please help me to solve the problem, thank you for your help.

Hi, I am very interested in wordpress and this pinshop theme. But I am not so sure this pinshop theme can also be utilized by wordpress.

Could you give me an advice?

ninebit

hello, wordpress theme in on our plans, but is very hard to create theme in current wordpress themes trends :(

man i really need ur help am using a marketplace app the way it show the product in the seller profile is wrong.. i want to show theme as pin.. same as the home page here the page : http://i42.tinypic.com/2jdi8ax.png here the TPL of the seller profile that should be fixed. .please help me
<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>

<div id="content" class="ms-catalog-seller-profile">
    <?php echo $content_top; ?>

    <div class="breadcrumb">
        <?php foreach ($breadcrumbs as $breadcrumb) { ?>
        <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
        <?php } ?>
    </div>

    <div class="ms-sellerprofile">
        <div class="seller-data">
            <div class="avatar-box">
                <h2><?php echo $seller['nickname']; ?></h2>
                <img src="<?php echo $seller['thumb']; ?>" />

                <br />
                <?php foreach($seller['badges'] as $badge) { ?>
                    <img src="<?php echo $badge['image']; ?>" title="<?php echo $badge['description']; ?>" />
                <?php } ?>
            </div>

            <div class="info-box">
                <?php if ($seller['country']) { ?>
                    <p><b><?php echo $ms_catalog_seller_profile_country; ?></b> <?php echo $seller['country']; ?></p>
                <?php } ?>

                <?php if ($seller['company']) { ?>
                    <p><b><?php echo $ms_catalog_seller_profile_company; ?></b> <?php echo $seller['company']; ?></p>
                <?php } ?>

                <?php if ($seller['website']) { ?>
                    <p><b><?php echo $ms_catalog_seller_profile_website; ?></b> <?php echo $seller['website']; ?></p>
                <?php } ?>

                <?php
                    if ($total_votes % 10 == 1) {
                        $ms_rating_word = $ms_catalog_seller_profile_ratings_singular;
                    } else {
                        $ms_rating_word = $ms_catalog_seller_profile_ratings_plural;
                    }
                ?>

                <p><b><?php echo $ms_catalog_seller_profile_totalsales; ?></b> <?php echo $seller['total_sales']; ?></p>
                <p><b><?php echo $ms_catalog_seller_profile_totalproducts; ?></b> <?php echo $seller['total_products']; ?></p>
                <p><b><?php echo $ms_catalog_seller_profile_rating_overall; ?></b> <?php echo $avg_overall; ?> (<?php echo $total_votes . " " . $ms_rating_word; ?>)</p>
                <p><b><?php echo $ms_catalog_seller_profile_rating_communication; ?></b> <?php echo $avg_communication; ?></p>
                <p><b><?php echo $ms_catalog_seller_profile_rating_honesty; ?></b> <?php echo $avg_honesty; ?></p>
                <?php if ((!$this->customer->getId() || ($this->customer->getId() && $this->customer->getId() != $seller['seller_id'])) && ($this->config->get('msconf_enable_private_messaging') == 2 || ($this->config->get('msconf_enable_private_messaging') == 1 && $this->customer->getId()))) { ?>
                    <p><a href="index.php?route=seller/catalog-seller/jxRenderContactDialog&seller_id=<?php echo $seller_id; ?>" class="ms-sellercontact" title="<?php echo $ms_sellercontact_title; ?>"><?php echo $ms_catalog_product_contact; ?></a></p>
                <?php } ?>
            </div>
        </div>

        <div class="seller-description">
            <h4>About the seller</h4>
            <?php echo $seller['description']; ?>
        </div>
    </div>

    <div id="seller-tabs" class="htabs">
        <a href="#tab-products"><?php echo $ms_catalog_seller_profile_tab_products; ?></a>
        <?php if ($this->config->get('msconf_seller_comments_enable')) { ?><a href="#tab-comments"><?php echo $ms_catalog_seller_profile_tab_comments; ?></a><?php } ?>
    </div>

    <div id="tab-products" class="tab-content">
        <?php if ($seller['products']) { ?>
            <div class="box-product">
                <?php foreach ($seller['products'] as $product) { ?>
                <div>
                    <?php if ($product['thumb']) { ?>
                        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
                    <?php } ?>

                    <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>

                    <?php if ($product['price']) { ?>
                        <div class="price">
                            <?php if (!$product['special']) { ?>
                                <?php echo $product['price']; ?>
                            <?php } else { ?>
                                <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
                            <?php } ?>
                        </div>
                    <?php } ?>

                    <?php if ($product['rating']) { ?>
                        <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
                    <?php } ?>

                    <div class="cart">
                        <input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />
                    </div>
                </div>
                <?php } ?>
            </div>
            <p style="text-align: right; margin: 0"><a href="<?php echo $seller['href']; ?>"><?php echo $ms_catalog_seller_profile_view; ?></a></p>
        <?php } else { ?>
            <p style="text-align: center"><?php echo $ms_catalog_seller_products_empty; ?></p>
        <?php } ?>
    </div>

    <?php if ($this->config->get('msconf_seller_comments_enable')) { ?>
    <div id="tab-comments" class="tab-content">
        <script type="text/javascript">
            $(function(){
                $('#tab-comments .pcForm').load('index.php?route=module/ms-comments/renderForm&seller_id=<?php echo $seller_id; ?>>');
                $('#tab-comments .pcComments').load('index.php?route=module/ms-comments/renderComments&seller_id=<?php echo $seller_id; ?>');
            });
        </script>

        <div class="pcComments" />
        <div class="pcForm" />
    </div>
    <?php } ?>

    <?php echo $content_bottom; ?>
</div>

<script type="text/javascript">
    $(function(){
        $('#seller-tabs a').tabs();
    });
</script>

<?php echo $footer; ?>
here the php file that should be edited
<?php 
class ControllerSellerCatalogSeller extends ControllerSellerCatalog {
    public function __construct($registry) {
        parent::__construct($registry);

        $this->language->load('product/category');
        $this->load->model('localisation/country');
        $this->load->model('catalog/category');
        $this->load->model('catalog/product');
        $this->load->model('tool/image');
    }

    public function index() {
        $this->document->addScript('catalog/view/javascript/jquery/jquery.total-storage.min.js');

        $this->data['text_display'] = $this->language->get('text_display');
        $this->data['text_list'] = $this->language->get('text_list');
        $this->data['text_grid'] = $this->language->get('text_grid');
        $this->data['text_sort'] = $this->language->get('text_sort');
        $this->data['text_limit'] = $this->language->get('text_limit');

        if (isset($this->request->get['sort'])) {
            $order_by = $this->request->get['sort'];
        } else {
            $order_by = 'ms.nickname';
        }

        if (isset($this->request->get['order'])) {
            $order_way = $this->request->get['order'];
        } else {
            $order_way = 'ASC';
        }

        $page = isset($this->request->get['page']) ? $this->request->get['page'] : 1;

        if (isset($this->request->get['limit'])) {
            $limit = $this->request->get['limit'];
        } else {
            $limit = $this->config->get('config_catalog_limit');
        }

        $this->data['products'] = array();

        $total_sellers = $this->MsLoader->MsSeller->getTotalSellers(array(
            'seller_status' => array(MsSeller::STATUS_ACTIVE) 
        ));

        $results = $this->MsLoader->MsSeller->getSellers(
            array(
                'seller_status' => array(MsSeller::STATUS_ACTIVE)
            ),
            array(
                'order_by'    => $order_by,
                'order_way'    => $order_way,
                'offset'    => ($page - 1) * $limit,
                'limit'        => $limit
            )
        );

        foreach ($results as $result) {
            if ($result['ms.avatar'] && file_exists(DIR_IMAGE . $result['ms.avatar'])) {
                $image = $this->MsLoader->MsFile->resizeImage($result['ms.avatar'], $this->config->get('msconf_seller_avatar_seller_list_image_width'), $this->config->get('msconf_seller_avatar_seller_list_image_height'));
            } else {
                $image = $this->MsLoader->MsFile->resizeImage('ms_no_image.jpg', $this->config->get('msconf_seller_avatar_seller_list_image_width'), $this->config->get('msconf_seller_avatar_seller_list_image_height'));
            }

            $rate = $this->MsLoader->MsSeller->getRate(array('seller_id' => $result['seller_id']), true);

            $country = $this->model_localisation_country->getCountry($result['ms.country_id']);
            $this->data['sellers'][] = array(
                'seller_id'  => $result['seller_id'],
                'thumb'       => $image,
                'nickname'        => $result['ms.nickname'],
                'description' => utf8_substr(strip_tags(html_entity_decode($result['ms.description'], ENT_QUOTES, 'UTF-8')), 0, 200) . '..',
                //'rating'      => $result['rating'],
                'country' => ($country ? $country['name'] : NULL),
                'company' => ($result['ms.company'] ? $result['ms.company'] : NULL),
                'website' => ($result['ms.website'] ? $result['ms.website'] : NULL),
                'country_flag' => ($country ? 'image/flags/' . strtolower($country['iso_code_2']) . '.png' : NULL),
                'total_sales' => $this->MsLoader->MsSeller->getSalesForSeller($result['seller_id']),
                'total_products' => $this->MsLoader->MsProduct->getTotalProducts(array(
                    'seller_id' => $result['seller_id'],
                    'product_status' => array(MsProduct::STATUS_ACTIVE)
                )),
                'href'        => $this->url->link('seller/catalog-seller/profile', '&seller_id=' . $result['seller_id']),
                'avg' => round((float)$rate['avg_overall'], 2),
                'total_votes' => count($rate['rows'])
            );
        }

        $url = '';

        if (isset($this->request->get['limit'])) {
            $url .= '&limit=' . $this->request->get['limit'];
        }

        $this->data['sorts'] = array();

        $this->data['sorts'][] = array(
            'text'  => $this->language->get('ms_sort_nickname_asc'),
            'value' => 'ms.nickname-ASC',
            'href'  => $this->url->link('seller/catalog-seller', '&sort=ms.nickname&order=ASC' . $url)
        );

        $this->data['sorts'][] = array(
            'text'  => $this->language->get('ms_sort_nickname_desc'),
            'value' => 'ms.nickname-DESC',
            'href'  => $this->url->link('seller/catalog-seller', '&sort=ms.nickname&order=DESC' . $url)
        );

        $this->data['sorts'][] = array(
            'text'  => $this->language->get('ms_sort_country_asc'),
            'value' => 'ms.country_id-ASC',
            'href'  => $this->url->link('seller/catalog-seller', '&sort=ms.country_id&order=ASC' . $url)
        ); 

        $this->data['sorts'][] = array(
            'text'  => $this->language->get('ms_sort_country_desc'),
            'value' => 'ms.country_id-DESC',
            'href'  => $this->url->link('seller/catalog-seller', '&sort=ms.country_id&order=DESC' . $url)
        ); 

        $url = '';

        if (isset($this->request->get['sort'])) {
            $url .= '&sort=' . $this->request->get['sort'];
        }    

        if (isset($this->request->get['order'])) {
            $url .= '&order=' . $this->request->get['order'];
        }

        $this->data['limits'] = array();

        $this->data['limits'][] = array(
            'text'  => $this->config->get('config_catalog_limit'),
            'value' => $this->config->get('config_catalog_limit'),
            'href'  => $this->url->link('seller/catalog-seller', $url . '&limit=' . $this->config->get('config_catalog_limit'))
        );

        $this->data['limits'][] = array(
            'text'  => 25,
            'value' => 25,
            'href'  => $this->url->link('seller/catalog-seller', $url . '&limit=25')
        );

        $this->data['limits'][] = array(
            'text'  => 50,
            'value' => 50,
            'href'  => $this->url->link('seller/catalog-seller', $url . '&limit=50')
        );

        $this->data['limits'][] = array(
            'text'  => 75,
            'value' => 75,
            'href'  => $this->url->link('seller/catalog-seller', $url . '&limit=75')
        );

        $this->data['limits'][] = array(
            'text'  => 100,
            'value' => 100,
            'href'  => $this->url->link('seller/catalog-seller', $url . '&limit=100')
        );

        $url = '';

        if (isset($this->request->get['sort'])) {
            $url .= '&sort=' . $this->request->get['sort'];
        }    

        if (isset($this->request->get['order'])) {
            $url .= '&order=' . $this->request->get['order'];
        }

        if (isset($this->request->get['limit'])) {
            $url .= '&limit=' . $this->request->get['limit'];
        }

        $pagination = new Pagination();
        $pagination->total = $total_sellers;
        $pagination->page = $page;
        $pagination->limit = $limit;
        $pagination->text = $this->language->get('text_pagination');
        $pagination->url = $this->url->link('seller/catalog-seller', $url . '&page={page}');

        $this->data['pagination'] = $pagination->render();

        $this->data['sort'] = $order_by;
        $this->data['order'] = $order_way;
        $this->data['limit'] = $limit;        

        $this->data['continue'] = $this->url->link('common/home');

        $this->document->setTitle($this->language->get('ms_catalog_sellers_heading'));

        $this->data['breadcrumbs'] = $this->MsLoader->MsHelper->setBreadcrumbs(array(
            array(
                'text' => $this->language->get('ms_catalog_sellers'),
                'href' => $this->url->link('seller/catalog-seller', '', 'SSL'), 
            )
        ));

        list($this->template, $this->children) = $this->MsLoader->MsHelper->loadTemplate('catalog-seller');
        $this->response->setOutput($this->render());
    }

    public function profile() {
        $this->document->addScript('catalog/view/javascript/jquery/tabs.js');

        if (isset($this->request->get['seller_id'])) {
            $seller = $this->MsLoader->MsSeller->getSeller($this->request->get['seller_id']);
            $rate = $this->MsLoader->MsSeller->getRate(array('seller_id' => (int)$this->request->get['seller_id']), true);
        }

        if (!isset($seller) || empty($seller) || $seller['ms.seller_status'] != MsSeller::STATUS_ACTIVE) {
            $this->redirect($this->url->link('seller/catalog-seller', '', 'SSL'));
            return;
        }

        if ($this->config->get('msconf_seller_comments_enable')) {
            $this->document->addScript('catalog/view/javascript/ms-comments.js');

            if(file_exists('catalog/view/theme/'.$this->config->get('config_template').'/stylesheet/ms-comments.css')){
                $this->document->addStyle("catalog/view/theme/" . $this->config->get('config_template') . "/stylesheet/ms-comments.css");
            } else {
                $this->document->addStyle("catalog/view/theme/default/stylesheet/ms-comments.css");
            }
        }

        $this->document->addScript('catalog/view/javascript/dialog-sellercontact.js');

        if ($seller['ms.avatar'] && file_exists(DIR_IMAGE . $seller['ms.avatar'])) {
            $image = $this->MsLoader->MsFile->resizeImage($seller['ms.avatar'], $this->config->get('msconf_seller_avatar_seller_profile_image_width'), $this->config->get('msconf_seller_avatar_seller_profile_image_height'));
        } else {
            $image = $this->MsLoader->MsFile->resizeImage('ms_no_image.jpg', $this->config->get('msconf_seller_avatar_seller_profile_image_width'), $this->config->get('msconf_seller_avatar_seller_profile_image_height'));
        }

        $this->data['seller']['nickname'] = $seller['ms.nickname'];
        $this->data['seller']['seller_id'] = $seller['seller_id'];
        $this->data['seller']['description'] = html_entity_decode($seller['ms.description'], ENT_QUOTES, 'UTF-8');
        $this->data['seller']['thumb'] = $image;
        $this->data['seller']['href'] = $this->url->link('seller/catalog-seller/products', 'seller_id=' . $seller['seller_id']);
        $this->data['seller_id'] = $this->request->get['seller_id'];
        $this->data['avg_overall'] = round((float)$rate['avg_overall'], 2);
        $this->data['avg_communication'] = round((float)$rate['avg_communication'], 2);
        $this->data['avg_honesty'] = round((float)$rate['avg_honesty'], 2);
        $this->data['total_votes'] =  count($rate['rows']);

        $country = $this->model_localisation_country->getCountry($seller['ms.country_id']);

        if (!empty($country)) {            
            $this->data['seller']['country'] = $country['name'];
        } else {
            $this->data['seller']['country'] = NULL;
        }

        if (!empty($seller['ms.company'])) {
            $this->data['seller']['company'] = $seller['ms.company'];
        } else {
            $this->data['seller']['company'] = NULL;
        }

        if (!empty($seller['ms.website'])) {
            $this->data['seller']['website'] = $seller['ms.website'];
        } else {
            $this->data['seller']['website'] = NULL;
        }

        $this->data['seller']['total_sales'] = $this->MsLoader->MsSeller->getSalesForSeller($seller['seller_id']);
        $this->data['seller']['total_products'] = $this->MsLoader->MsProduct->getTotalProducts(array(
            'seller_id' => $seller['seller_id'],
            'product_status' => array(MsProduct::STATUS_ACTIVE)
        ));

        $products = $this->MsLoader->MsProduct->getProducts(
            array(
                'seller_id' => $seller['seller_id'],
                'language_id' => $this->config->get('config_language_id'),
                'product_status' => array(MsProduct::STATUS_ACTIVE)
            ),
            array(
                'order_by'    => 'pd.name',
                'order_way'    => 'ASC',
                'offset'    => 0,
                'limit'        => 5
            )
        );

        // badges
        $badges = array_unique(array_merge(
            $this->MsLoader->MsBadge->getSellerGroupBadges(array('seller_id' => $seller['seller_id'], 'language_id' => $this->config->get('config_language_id'))),
            $this->MsLoader->MsBadge->getSellerGroupBadges(array('seller_group_id' => $seller['ms.seller_group'], 'language_id' => $this->config->get('config_language_id'))),
            $this->MsLoader->MsBadge->getSellerGroupBadges(array('seller_group_id' => $this->config->get('msconf_default_seller_group_id'), 'language_id' => $this->config->get('config_language_id')))
        ), SORT_REGULAR);        

        foreach ($badges as &$badge) {
            $badge['image'] = $this->model_tool_image->resize($badge['image'], $this->config->get('msconf_badge_width'), $this->config->get('msconf_badge_height'));
        }
        $this->data['seller']['badges'] = $badges;

        if (!empty($products)) {
            foreach ($products as $product) {
                $product_data = $this->model_catalog_product->getProduct($product['product_id']);
                if ($product_data['image'] && file_exists(DIR_IMAGE . $product_data['image'])) {
                    $image = $this->MsLoader->MsFile->resizeImage($product_data['image'], $this->config->get('msconf_product_seller_profile_image_width'), $this->config->get('msconf_product_seller_profile_image_height'));
                } else {
                    $image = $this->MsLoader->MsFile->resizeImage('no_image.jpg', $this->config->get('msconf_product_seller_profile_image_width'), $this->config->get('msconf_product_seller_profile_image_height'));
                }

                if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
                    $price = $this->currency->format($this->tax->calculate($product_data['price'], $product_data['tax_class_id'], $this->config->get('config_tax')));
                } else {
                    $price = false;
                }

                if ((float)$product_data['special']) {
                    $special = $this->currency->format($this->tax->calculate($product_data['special'], $product_data['tax_class_id'], $this->config->get('config_tax')));
                } else {
                    $special = false;
                }

                if ($this->config->get('config_review_status')) {
                    $rating = $product_data['rating'];
                } else {
                    $rating = false;
                }

                $this->data['seller']['products'][] = array(
                    'product_id' => $product['product_id'],                
                    'thumb' => $image,
                    'name' => $product_data['name'],
                    'price' => $price,
                    'special' => $special,
                    'rating' => $rating,
                    'reviews'    => sprintf($this->language->get('text_reviews'), (int)$product_data['reviews']),
                    'href'         => $this->url->link('product/product', 'product_id=' . $product_data['product_id']),                        
                );                
            }
        } else {
            $this->data['seller']['products'] = NULL;
        }

        $this->data['ms_catalog_seller_profile_view'] = sprintf($this->language->get('ms_catalog_seller_profile_view'), $this->data['seller']['nickname']);
        $this->document->setTitle(sprintf($this->language->get('ms_catalog_seller_profile_heading'), $this->data['seller']['nickname']));

        $this->data['breadcrumbs'] = $this->MsLoader->MsHelper->setBreadcrumbs(array(
            array(
                'text' => $this->language->get('ms_catalog_sellers'),
                'href' => $this->url->link('seller/catalog-seller', '', 'SSL'), 
            ),
            array(
                'text' => sprintf($this->language->get('ms_catalog_seller_profile_breadcrumbs'), $this->data['seller']['nickname']),
                'href' => $this->url->link('seller/catalog-seller/profile', '&seller_id='.$seller['seller_id'], 'SSL'),
            )
        ));

        list($this->template, $this->children) = $this->MsLoader->MsHelper->loadTemplate('catalog-seller-profile');
        $this->response->setOutput($this->render());
      }

    public function products() {
        if (isset($this->request->get['seller_id'])) {
            $seller = $this->MsLoader->MsSeller->getSeller($this->request->get['seller_id']);
        }

        if (!isset($seller) || empty($seller) || $seller['ms.seller_status'] != MsSeller::STATUS_ACTIVE) {
            $this->redirect($this->url->link('seller/catalog-seller', '', 'SSL'));
            return;
        }

        $this->document->addScript('catalog/view/javascript/jquery/jquery.total-storage.min.js');

        /* seller info part */    
        if ($seller['ms.avatar'] && file_exists(DIR_IMAGE . $seller['ms.avatar'])) {
            $image = $this->MsLoader->MsFile->resizeImage($seller['ms.avatar'], $this->config->get('msconf_product_seller_products_image_width'), $this->config->get('msconf_product_seller_products_image_height'));
        } else {
            $image = $this->MsLoader->MsFile->resizeImage('ms_no_image.jpg', $this->config->get('msconf_product_seller_products_image_width'), $this->config->get('msconf_product_seller_products_image_height'));
        }

        $this->data['seller']['nickname'] = $seller['ms.nickname'];
        $this->data['seller']['description'] = $seller['ms.description'];
        $this->data['seller']['thumb'] = $image;
        $this->data['seller']['href'] = $this->url->link('seller/catalog-seller/profile', 'seller_id=' . $seller['seller_id']);

        $country = $this->model_localisation_country->getCountry($seller['ms.country_id']);

        if (!empty($country)) {            
            $this->data['seller']['country'] = $country['name'];
        } else {
            $this->data['seller']['country'] = NULL;
        }

        if (!empty($seller['ms.company'])) {
            $this->data['seller']['company'] = $seller['ms.company'];
        } else {
            $this->data['seller']['company'] = NULL;
        }

        if (!empty($seller['ms.website'])) {
            $this->data['seller']['website'] = $seller['ms.website'];
        } else {
            $this->data['seller']['website'] = NULL;
        }

        // badges
        $badges = array_unique(array_merge(
            $this->MsLoader->MsBadge->getSellerGroupBadges(array('seller_id' => $seller['seller_id'], 'language_id' => $this->config->get('config_language_id'))),
            $this->MsLoader->MsBadge->getSellerGroupBadges(array('seller_group_id' => $seller['ms.seller_group'], 'language_id' => $this->config->get('config_language_id'))),
            $this->MsLoader->MsBadge->getSellerGroupBadges(array('seller_group_id' => $this->config->get('msconf_default_seller_group_id'), 'language_id' => $this->config->get('config_language_id')))
        ), SORT_REGULAR);        

        $this->data['seller']['total_sales'] = $this->MsLoader->MsSeller->getSalesForSeller($seller['seller_id']);
        $this->data['seller']['total_products'] = $this->MsLoader->MsProduct->getTotalProducts(array(
            'seller_id' => $seller['seller_id'],
            'product_status' => array(MsProduct::STATUS_ACTIVE)
        ));

        foreach ($badges as &$badge) {
            $badge['image'] = $this->model_tool_image->resize($badge['image'], $this->config->get('msconf_badge_width'), $this->config->get('msconf_badge_height'));
        }
        $this->data['seller']['badges'] = $badges;

        /* seller products part */
        $this->data['text_display'] = $this->language->get('text_display');
        $this->data['text_list'] = $this->language->get('text_list');
        $this->data['text_grid'] = $this->language->get('text_grid');
        $this->data['text_sort'] = $this->language->get('text_sort');
        $this->data['text_limit'] = $this->language->get('text_limit');

        $available_sorts = array('pd.name-ASC', 'pd.name-DESC', 'ms.country_id-ASC', 'ms.country_id-DESC', 'pd.name', 'ms.country_id');
        if (isset($this->request->get['sort'])) {
            $order_by = $this->request->get['sort'];
            if (!in_array($order_by, $available_sorts)) {
                $order_by = 'pd.name';
            }
        } else {
            $order_by = 'pd.name';
        }

        if (isset($this->request->get['order'])) {
            $order_way = $this->request->get['order'];
        } else {
            $order_way = 'ASC';
        }

        $page = isset($this->request->get['page']) ? $this->request->get['page'] : 1;    

        if (isset($this->request->get['limit'])) {
            $limit = $this->request->get['limit'];
        } else {
            $limit = $this->config->get('config_catalog_limit');
        }

        $this->data['products'] = array();

        $sort = array(
            //'filter_category_id' => $category_id, 
            'order_by'               => $order_by,
            'order_way'              => $order_way,
            'offset'              => ($page - 1) * $limit,
            'limit'              => $limit
        );

        $total_products = $this->MsLoader->MsProduct->getTotalProducts(array(
            'seller_id' => $seller['seller_id'],
            'product_status' => array(MsProduct::STATUS_ACTIVE)
        ));

        $products = $this->MsLoader->MsProduct->getProducts(
            array(
                'seller_id' => $seller['seller_id'],
                'product_status' => array(MsProduct::STATUS_ACTIVE)
            ),
            $sort
        );

        if (!empty($products)) {
            foreach ($products as $product) {
                $product_data = $this->model_catalog_product->getProduct($product['product_id']);
                if ($product_data['image'] && file_exists(DIR_IMAGE . $product_data['image'])) {
                    $image = $this->MsLoader->MsFile->resizeImage($product_data['image'], $this->config->get('msconf_product_seller_products_image_width'), $this->config->get('msconf_product_seller_products_image_height'));
                } else {
                    $image = $this->MsLoader->MsFile->resizeImage('no_image.jpg', $this->config->get('msconf_product_seller_products_image_width'), $this->config->get('msconf_product_seller_products_image_height'));
                }

                if (($this->config->get('config_customer_price') && $this->customer->isLogged()) || !$this->config->get('config_customer_price')) {
                    $price = $this->currency->format($this->tax->calculate($product_data['price'], $product_data['tax_class_id'], $this->config->get('config_tax')));
                } else {
                    $price = false;
                }

                if ((float)$product_data['special']) {
                    $special = $this->currency->format($this->tax->calculate($product_data['special'], $product_data['tax_class_id'], $this->config->get('config_tax')));
                } else {
                    $special = false;
                }

                if ($this->config->get('config_review_status')) {
                    $rating = $product_data['rating'];
                } else {
                    $rating = false;
                }

                if ($this->config->get('config_tax')) {
                    $tax = $this->currency->format((float)$product_data['special'] ? $product_data['special'] : $product_data['price']);
                } else {
                    $tax = false;
                }

                $this->data['seller']['products'][] = array(
                    'product_id' => $product['product_id'],
                    'thumb' => $image,
                    'name' => $product_data['name'],
                    'price' => $price,
                    'tax' => $tax,
                    'special' => $special,
                    'rating' => $rating,
                    'description' => utf8_substr(strip_tags(html_entity_decode($product_data['description'], ENT_QUOTES, 'UTF-8')), 0, 100) . '..',                    
                    'reviews'    => sprintf($this->language->get('text_reviews'), (int)$product_data['reviews']),
                    'href'         => $this->url->link('product/product', 'product_id=' . $product_data['product_id']),                        
                );                
            }
        } else {
            $this->data['seller']['products'] = NULL;
        }

        $url = '';

        if (isset($this->request->get['limit'])) {
            $url .= '&limit=' . $this->request->get['limit'];
        }

        $this->data['sorts'] = array();

        $this->data['sorts'][] = array(
            'text'  => $this->language->get('ms_sort_nickname_asc'),
            'value' => 'pd.name-ASC',
            'href'  => $this->url->link('seller/catalog-seller/products', '&sort=pd.name&order=ASC&seller_id=' . $seller['seller_id'] . $url)
        );

        $this->data['sorts'][] = array(
            'text'  => $this->language->get('ms_sort_nickname_desc'),
            'value' => 'pd.name-DESC',
            'href'  => $this->url->link('seller/catalog-seller/products', '&sort=pd.name&order=DESC&seller_id=' . $seller['seller_id'] . $url)
        );

        /*
        $this->data['sorts'][] = array(
            'text'  => $this->language->get('ms_sort_country_asc'),
            'value' => 'ms.country_id-ASC',
            'href'  => $this->url->link('seller/catalog-seller/products', '&sort=ms.country_id&order=ASC' . $url)
        ); 

        $this->data['sorts'][] = array(
            'text'  => $this->language->get('ms_sort_country_desc'),
            'value' => 'ms.country_id-DESC',
            'href'  => $this->url->link('seller/catalog-seller/products', '&sort=ms.country_id&order=DESC' . $url)
        ); 
        */
        $url = '';

        if (isset($this->request->get['sort'])) {
            $url .= '&sort=' . $this->request->get['sort'];
        }    

        if (isset($this->request->get['order'])) {
            $url .= '&order=' . $this->request->get['order'];
        }

        $this->data['limits'] = array();

        $this->data['limits'][] = array(
            'text'  => $this->config->get('config_catalog_limit'),
            'value' => $this->config->get('config_catalog_limit'),
            'href'  => $this->url->link('seller/catalog-seller/products', $url . '&limit=' . $this->config->get('config_catalog_limit') . '&seller_id=' . $seller['seller_id'])
        );

        $this->data['limits'][] = array(
            'text'  => 25,
            'value' => 25,
            'href'  => $this->url->link('seller/catalog-seller/products', $url . '&limit=25&seller_id=' . $seller['seller_id'])
        );

        $this->data['limits'][] = array(
            'text'  => 50,
            'value' => 50,
            'href'  => $this->url->link('seller/catalog-seller/products', $url . '&limit=50&seller_id=' . $seller['seller_id'])
        );

        $this->data['limits'][] = array(
            'text'  => 75,
            'value' => 75,
            'href'  => $this->url->link('seller/catalog-seller/products', $url . '&limit=75&seller_id=' . $seller['seller_id'])
        );

        $this->data['limits'][] = array(
            'text'  => 100,
            'value' => 100,
            'href'  => $this->url->link('seller/catalog-seller/products', $url . '&limit=100&seller_id=' . $seller['seller_id'])
        );

        $url = '';

        if (isset($this->request->get['sort'])) {
            $url .= '&sort=' . $this->request->get['sort'];
        }    

        if (isset($this->request->get['order'])) {
            $url .= '&order=' . $this->request->get['order'];
        }

        if (isset($this->request->get['limit'])) {
            $url .= '&limit=' . $this->request->get['limit'];
        }

        $pagination = new Pagination();
        $pagination->total = $total_products;
        $pagination->page = $page;
        $pagination->limit = $limit;
        $pagination->text = $this->language->get('text_pagination');
        $pagination->url = $this->url->link('seller/catalog-seller/products', $url . '&page={page}&seller_id=' . $seller['seller_id']);

        $this->data['pagination'] = $pagination->render();

        $this->data['sort'] = $order_by;
        $this->data['order'] = $order_way;
        $this->data['limit'] = $limit;        

        $this->data['ms_catalog_seller_products'] = sprintf($this->language->get('ms_catalog_seller_products_heading'), $seller['ms.nickname']);
        $this->document->setTitle(sprintf($this->language->get('ms_catalog_seller_products_heading'), $seller['ms.nickname']));

        $this->data['breadcrumbs'] = $this->MsLoader->MsHelper->setBreadcrumbs(array(
            array(
                'text' => $this->language->get('ms_catalog_sellers'),
                'href' => $this->url->link('seller/catalog-seller', '', 'SSL'), 
            ),
            array(
                'text' => sprintf($this->language->get('ms_catalog_seller_products_breadcrumbs'), $seller['ms.nickname']),
                'href' => $this->url->link('seller/catalog-seller/profile', '&seller_id='.$seller['seller_id'], 'SSL'),
            )
        ));

        list($this->template, $this->children) = $this->MsLoader->MsHelper->loadTemplate('catalog-seller-products');
        $this->response->setOutput($this->render());
    }

    public function jxSubmitContactDialog() {
        if ($this->config->get('msconf_enable_private_messaging') == 2) {
            return $this->_submitEmailDialog();
        } else if ($this->config->get('msconf_enable_private_messaging') == 1 && $this->customer->getId()) {
            return $this->_submitPmDialog();
        } else {
            return false;
        }
    }

    private function _submitEmailDialog() {
        $seller_id = $this->request->post['seller_id'];
        $product_id = $this->request->post['product_id'];
        $seller_email = $this->MsLoader->MsSeller->getSellerEmail($seller_id);
        $seller_name = $this->MsLoader->MsSeller->getSellerName($seller_id);
        $message_text = trim($this->request->post['ms-sellercontact-text']);
        $customer_name = mb_substr(trim($this->request->post['ms-sellercontact-name']), 0, 50);
        $customer_email = $this->request->post['ms-sellercontact-email'];

        $json = array();

        if (empty($message_text) || empty($customer_name) || empty($customer_email) || empty($this->request->post['ms-sellercontact-captcha'])) {
            $json['errors'][] = $this->language->get('ms_error_contact_allfields');
            $this->response->setOutput(json_encode($json));
            return;
        }

        if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['ms-sellercontact-captcha'])) {
            $json['errors'][] = $this->language->get('ms_error_contact_captcha');
        }

        if (!filter_var($customer_email, FILTER_VALIDATE_EMAIL)) {
            $json['errors'][] = $this->language->get('ms_error_contact_email');            
        }

        if (mb_strlen($message_text) > 2000) {
            $json['errors'][] = $this->language->get('ms_error_contact_text');
        }

        if (!isset($json['errors'])) {    
            $mails[] = array(
                'type' => MsMail::SMT_SELLER_CONTACT,
                'data' => array(
                    'recipients' => $seller_email,
                    'customer_name' => $customer_name,
                    'customer_email' => $customer_email,
                    'customer_message' => $message_text,
                    'product_id' => $product_id,
                    'addressee' => $seller_name
                )
            );            
            $this->MsLoader->MsMail->sendMails($mails);
            $json['success'] = $this->language->get('ms_sellercontact_success');
        }
        $this->response->setOutput(json_encode($json));
    }

    private function _submitPmDialog() {
        $seller_id = $this->request->post['seller_id'];
        $product_id = $this->request->post['product_id'];
        $seller_name = $this->MsLoader->MsSeller->getSellerName($seller_id);
        $message_text = trim($this->request->post['ms-sellercontact-text']);
        $seller_email = $this->MsLoader->MsSeller->getSellerEmail($seller_id);
        $customer_name = $this->customer->getFirstname() . ' ' . $this->customer->getLastname();

        $json = array();

        if (empty($message_text)) {
            $json['errors'][] = $this->language->get('ms_error_contact_allfields');
            $this->response->setOutput(json_encode($json));
            return;
        }

        if (mb_strlen($message_text) > 2000) {
            $json['errors'][] = $this->language->get('ms_error_contact_text');
        }

        if (!isset($this->session->data['captcha']) || ($this->session->data['captcha'] != $this->request->post['ms-sellercontact-captcha'])) {
            $json['errors'][] = $this->language->get('ms_error_contact_captcha');
        }

        $product = $this->MsLoader->MsProduct->getProduct($product_id);
        $product_name = $product['languages'][$this->MsLoader->MsHelper->getLanguageId($this->config->get('config_language'))]['name'];

        $title = $product_id ? sprintf($this->language->get('ms_conversation_title_product'), $product_name) : sprintf($this->language->get('ms_conversation_title'), $customer_name);

        if (!isset($json['errors'])) {
            $conversation_id = $this->MsLoader->MsConversation->createConversation(
                array(
                    'product_id' => $product_id,
                    'title' => $title,
                )
            );

            $this->MsLoader->MsMessage->createMessage(
                array(
                    'conversation_id' => $conversation_id,
                    'from' => $this->customer->getId(),
                    'to' => $seller_id,
                    'message' => $message_text
                )
            );

            $mails[] = array(
                'type' => MsMail::SMT_PRIVATE_MESSAGE,
                'data' => array(
                    'recipients' => $seller_email,
                    'customer_name' => $customer_name,
                    'customer_message' => $message_text,
                    'title' => $title,
                    'product_id' => $product_id,
                    'addressee' => $seller_name
                )
            );            
            $this->MsLoader->MsMail->sendMails($mails);

            $json['success'] = $this->language->get('ms_sellercontact_success');
        }
        $this->response->setOutput(json_encode($json));
    }

    public function jxRenderContactDialog() {
        if ($this->config->get('msconf_enable_private_messaging') == 2) {
            return $this->_renderEmailDialog();
        } else if ($this->config->get('msconf_enable_private_messaging') == 1 && $this->customer->getId()) {
            return $this->_renderPmDialog(); 
        } else {
            return false;
        }
    }

    private function _renderEmailDialog() {
        if (isset($this->request->get['product_id'])) {
            $seller_id = $this->MsLoader->MsProduct->getSellerId($this->request->get['product_id']);
            $this->data['product_id'] = (int)$this->request->get['product_id'];
        } else {
            $seller_id = $this->request->get['seller_id'];
            $this->data['product_id'] = 0;
        }
        $seller = $this->MsLoader->MsSeller->getSeller($seller_id);

        if (empty($seller))
            return false;

        $this->data['seller_id'] = $seller_id;

        $this->data['customer_email'] = $this->customer->getEmail();
        $this->data['customer_name'] = $this->customer->getFirstname() . ' ' . $this->customer->getLastname();

        if (!empty($seller['ms.avatar'])) {
            $this->data['seller_thumb'] = $this->MsLoader->MsFile->resizeImage($seller['ms.avatar'], $this->config->get('msconf_seller_avatar_product_page_image_width'), $this->config->get('msconf_seller_avatar_product_page_image_height'));
        } else {
            $this->data['seller_thumb'] = $this->MsLoader->MsFile->resizeImage('ms_no_image.jpg', $this->config->get('msconf_seller_avatar_product_page_image_width'), $this->config->get('msconf_seller_avatar_product_page_image_height'));
        }

        $this->data['seller_href'] = $this->url->link('seller/catalog-seller/profile', 'seller_id=' . $seller['seller_id']);
        $this->data['ms_sellercontact_sendmessage'] = sprintf($this->language->get('ms_sellercontact_sendmessage'), $seller['ms.nickname']);

        list($this->template, $this->children) = $this->MsLoader->MsHelper->loadTemplate('dialog-sellercontact');
        return $this->response->setOutput($this->render());
    }

    private function _renderPmDialog() {
        if (isset($this->request->get['product_id'])) {
            $seller_id = $this->MsLoader->MsProduct->getSellerId($this->request->get['product_id']);
            $this->data['product_id'] = (int)$this->request->get['product_id'];
        } else {
            $seller_id = $this->request->get['seller_id'];
            $this->data['product_id'] = 0;
        }
        $seller = $this->MsLoader->MsSeller->getSeller($seller_id);

        if (empty($seller))
            return false;

        $this->data['seller_id'] = $seller_id;

        if (!empty($seller['ms.avatar'])) {
            $this->data['seller_thumb'] = $this->MsLoader->MsFile->resizeImage($seller['ms.avatar'], $this->config->get('msconf_seller_avatar_product_page_image_width'), $this->config->get('msconf_seller_avatar_product_page_image_height'));
        } else {
            $this->data['seller_thumb'] = $this->MsLoader->MsFile->resizeImage('ms_no_image.jpg', $this->config->get('msconf_seller_avatar_product_page_image_width'), $this->config->get('msconf_seller_avatar_product_page_image_height'));
        }

        $this->data['seller_href'] = $this->url->link('seller/catalog-seller/profile', 'seller_id=' . $seller['seller_id']);
        $this->data['ms_sellercontact_sendmessage'] = sprintf($this->language->get('ms_sellercontact_sendmessage'), $seller['ms.nickname']);

        list($this->template, $this->children) = $this->MsLoader->MsHelper->loadTemplate('dialog-sellercontact');
        return $this->response->setOutput($this->render());
    }

    public function jxSubmitRateDialog() {
        $data = $this->request->post;

        $json = array();

        foreach ($data['seller_id'] as $seller_id) {
            if (mb_strlen($data['ms-seller-rate-text'][$seller_id]) > 300) {
                $json['errors'][] = $this->language->get('ms_error_rate_comment_length');
            } else if (!isset($data['ms-seller-rate-text'][$seller_id]) || $data['ms-seller-rate-text'][$seller_id] == "") {
                $json['errors'][] = $this->language->get('ms_error_rate_no_comment');
            } else if ( !isset($data['rating_overall'][$seller_id]) || $data['rating_overall'][$seller_id] == "" || !isset($data['rating_communication'][$seller_id]) || $data['rating_communication'][$seller_id] == "" || !isset($data['rating_honesty'][$seller_id]) || $data['rating_honesty'][$seller_id] == "" ) {
                $json['errors'][] = $this->language->get('ms_error_rate_no_rating');
            }
        }

        if (!isset($json['errors'])) {
            foreach ($data['seller_id'] as $seller_id) {
                $seller_rating = array(
                    'order_id' => $data['order_id'],
                    'evaluator_id' => $this->customer->getId(),
                    'rated_user_id' => $seller_id,
                    'comment' => $data['ms-seller-rate-text'][$seller_id],
                    'rating_overall' => $data['rating_overall'][$seller_id],
                    'rating_communication' => $data['rating_communication'][$seller_id],
                    'rating_honesty' => $data['rating_honesty'][$seller_id]
                );

                $this->MsLoader->MsSeller->rate($seller_rating);
            }

            $json['success'] = $this->language->get('ms_seller_rate_success');
            $json['redirect'] = $this->url->link('account/order');
        }
        $this->response->setOutput(json_encode($json));
    }
}
?>

Hello i’ve stated workin’ with this template today :) I want to know if its possible to change products thumbnails size and if i can use gif fir products please :)

ninebit

yes, you can

what about RTL theme ?

hello. Product Search by tag is not working!!! do u have any fix for this. Thank you

ninebit

hello, it’s only on demo page. Demo still using Opencart 1.5.5, but 1.5.6 fixes this problem…

anyway to show top cart when hover?

Hi Ninebit-

I discovered that your theme was overriding the $filter_tag variable, which OpenCart usually fills in as the search phrase. Your theme was making it blank, so I tried to fix it by doing this:

using my search bar IN: /catalog/model/catalog/smartsearch.php

AFTER: public function smartsearch($data = array()) {

ADD: if (empty($data[‘filter_tag’]) && !empty($data[‘filter_name’])) { $data[‘filter_tag’] = $data[‘filter_name’]; }

However, that did not seem to solve the issue. I spent significant time trying to fix it, but unfortunately could not find the cause of the issue.

1- am made the the wishlist n the top of the page to be a heart icon ( font awsome) and it show the number of wishlist when hover (tooltip) but the problem that the tool tip is not updating after addtowishlist… its updating only after page refrech 2-how to show image in top cart?

I see so many claims to you about the Theme. You plan any update?

hii..i have setup the theme here http://sourceoneinteractivemedia.com/misc/test/designer_studio/ i wish to show 3 products per row and ONLY 5 rows, with pagination, how can i do this
edo081 Purchased

Hi i bought your theme it is awesome i have only one question, for a category page i would like to put a sidebar in it with the categories and a filter or something is that possible.

what files should be edited?

gr Erik

Hello. How do I change the language? Is it possible to offer more than one language?

Regards,

ninebit

yes, in opencart administrator panel.

Hello,

How do I upgrade to the new OpenCart version without losing the theme?

Regards,

ninebit

yes, just update opencart and rewrite files in “controller” folder by teh installing instructions.

Has anyone found a suitable filter extension for this theme? I would like to add a filter column (left side) on the category pages to sort by 3-4 product attributes.

Images in product page are pretty big. Can they be changed? It is should be in admin panel or in which file?

Horrible customer service. Replies take 3-4 weeks (if any).

ninebit

sorry! I was away for a while, but now I’m back. can I help you?

by
by
by
by
by
by