\

Functions

ecatalog_add_contact_form_7()

ecatalog_add_contact_form_7(  $form_data) : boolean

ecatalog_add_contact_form_7 will add data based on submitted contact forms Here is an inline example: <code> <?php if(ecatalog_add_contact_form_7($form_data)){} ?> </code>

Parameters

$form_data

Returns

boolean

ecatalog_cart_add_product()

ecatalog_cart_add_product(  $product,   $quantity) : void

ecatalog_cart_add_product will add the product into the cart using sesssion Here is an inline example: <code> <?php ecatalog_cart_add_product($product,$quantity); ?> </code>

Parameters

$product
$quantity

ecatalog_cart_clear_products()

ecatalog_cart_clear_products() : array

ecatalog_cart_get_products will return the product into the cart using sesssion Here is an inline example: <code> <?php ecatalog_cart_clear_products(); ?> </code>

Returns

array —

| products in cart

ecatalog_cart_delete_product()

ecatalog_cart_delete_product(  $id) : void

ecatalog_cart_delete_product will delete the product into the cart using sesssion Here is an inline example: <code> <?php ecatalog_cart_delete_product($id); ?> </code>

Parameters

$id

ecatalog_cart_get_products()

ecatalog_cart_get_products() : array

ecatalog_cart_get_products will return the product into the cart using sesssion Here is an inline example: <code> <?php foreach ($_SESSION['ecatalog_product_enquiry'] as $key => $product_obj) {} ?> </code>

Returns

array —

| products in cart

ecatalog_convert_to_option()

ecatalog_convert_to_option(  $order) : string

ecatalog_convert_to_option will return coverted display order Here is an inline example: <code> <html> <a href="#" ><?php echo ecatalog_convert_to_option(SESSION::get('order_type')); ?></a> </html> </code>

Parameters

$order

Returns

string —

| coverted display order

ecatalog_featured_image()

ecatalog_featured_image() : void

ecatalog_featured_image will echo the current product featured image url Note: ecatalog_query_products should be called first Here is an inline example: <code> <html> <image src="<?php ecatalog_featured_image(); ?>" alt=""/> </html> </code>

ecatalog_footer()

ecatalog_footer() : array

ecatalog_footer will print system option website_footer_copyright_text how to use it: ecatalog_footer();

Returns

array —

| product ids

ecatalog_get_categories()

ecatalog_get_categories(  $options = array()) : array

ecatalog_get_categories will return categories based on categories and product_id Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php $categories = ecatalog_get_categories(); ?> </code>

Parameters

$options

Returns

array —

| array categories

ecatalog_get_default_view()

ecatalog_get_default_view() : string

ecatalog_get_default_view will return the default view Here is an inline example: <code> <?php $default_view = ecatalog_get_default_view(); ?> </code>

Returns

string —

| default view

ecatalog_get_featured_image()

ecatalog_get_featured_image() : string

ecatalog_get_featured_image will return the current product featured image url Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php echo ecatalog_get_featured_image() ?> </code>

Returns

string —

| featured image url

ecatalog_get_latest_products()

ecatalog_get_latest_products() : array

ecatalog_get_latest_products will return last 5 added products Here is an inline example: <code> <?php $latest_products = ecatalog_get_latest_products(); ?> </code>

Returns

array —

| array last 5 added products

ecatalog_get_product()

ecatalog_get_product(  $product_id = null,   $options = array()) : array

ecatalog_get_product will return product based on categories and id Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php $product = ecatalog_get_product($product_id); ?> </code>

Parameters

$product_id
$options

Returns

array —

| array current products

ecatalog_get_product_category_hierarchy()

ecatalog_get_product_category_hierarchy(  $category_id) : array

ecatalog_get_categories will return based on categories and product_id Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php $breadcrumb_categories = ecatalog_get_product_category_hierarchy($ecatalog_category['id']); ?> </code>

Parameters

$category_id

Returns

array —

| array categories

ecatalog_get_product_category_link()

ecatalog_get_product_category_link(  $category_id) : array

ecatalog_get_product_category_link will query based on categories and product_id Note: ecatalog_query_products should be called first Here is an inline example: <code> <html> <a href="<?php echo ecatalog_get_product_category_link($breadcrumb_category['id']); ?>" title="<?php echo $breadcrumb_category['category_name']; ?>">Sample</a> </html> </code>

Parameters

$category_id

Returns

array —

| array categories links

ecatalog_get_product_display_order()

ecatalog_get_product_display_order(  $order) : string

ecatalog_get_product_display_order will return the display order ecatalog_get_default_view will return the default view Here is an inline example: <code> <?php $order = ecatalog_get_product_display_order(''); ?> </code>

Parameters

$order

Returns

string —

| display order

ecatalog_get_product_images()

ecatalog_get_product_images(  $options = array()) : array

ecatalog_get_product_images will return based on product id Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php $product_images = ecatalog_get_product_images(array('product_id' => $id)); ?> </code>

Parameters

$options

Returns

array —

| array current products images

ecatalog_get_product_name()

ecatalog_get_product_name() : string

ecatalog_get_product_name will return the current product name Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php echo ecatalog_get_product_name(); ?> </code>

Returns

string —

| product name

ecatalog_get_product_permalink()

ecatalog_get_product_permalink() : string

ecatalog_get_product_permalink will return the current product permanent link Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php echo ecatalog_get_product_permalink(); ?> </code>

Returns

string —

| current product permanent link

ecatalog_get_product_tabs()

ecatalog_get_product_tabs() : array

ecatalog_get_product_tabs will return the product tabs for product description Here is an inline example: <code> <hmtl> <span><?php ecatalog_footer(); ?></span> </html> </code>

Returns

array —

| product tabs

ecatalog_get_products()

ecatalog_get_products(  $options = array()) : array

ecatalog_get_products will query based on categories and id Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php $posts = ecatalog_get_products(array('id' => $product_id)); ?> </code>

Parameters

$options

Returns

array —

| Array of Objects Product

ecatalog_get_related_product_id()

ecatalog_get_related_product_id(  $product_id) : array

ecatalog_get_related_product_id will return 3 latest related products id based on the current product id Here is an inline example: <code> <?php $product_ids = ecatalog_get_related_product_id($ecatalog_current_product['id']); ?> </code>

Parameters

$product_id

Returns

array —

| product ids

ecatalog_get_related_products()

ecatalog_get_related_products() : array

ecatalog_get_related_products will return 3 latest related products based on category of the current product Here is an inline example: <code> <?php $related_products = ecatalog_get_related_products(); ?> </code>

Returns

array —

| 3 products

ecatalog_get_search_products()

ecatalog_get_search_products(  $keyword,   $order) : string

get_product_order_display will return the product order query Here is an inline example: <code> <?php $search_results = ecatalog_get_search_products($input,$order); ?> </code>

Parameters

$keyword
$order

Returns

string —

| query order

ecatalog_get_url_slug()

ecatalog_get_url_slug() : string

ecatalog_get_url_slug will return the current product url slug Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php echo ecatalog_get_url_slug(); ?> </code>

Returns

string —

| return the current product url slug

ecatalog_have_products()

ecatalog_have_products() : integer

ecatalog_have_products will check if there are product existed or selected Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php ecatalog_query_products('url_slug=); if(ecatalog_have_products()){} ?> </code>

Returns

integer

ecatalog_highlight()

ecatalog_highlight() : void

ecatalog_highlight set session if new product is added to cart Here is an inline example: <code> <?php ecatalog_highlight(); ?> </code>

ecatalog_meta_description()

ecatalog_meta_description() : string

ecatalog_meta_description will return the current product meta description Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php echo ecatalog_meta_description(); ?> </code>

Returns

string —

| meta description

ecatalog_meta_title()

ecatalog_meta_title() : string

ecatalog_meta_title will return the current product meta title Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php echo ecatalog_meta_title(); ?> </code>

Returns

string —

| meta title

ecatalog_product_count()

ecatalog_product_count() : void

ecatalog_product_count will count the ecatalog_products array Note: ecatalog_query_products should be called first Here is an inline example: <code> <?php ecatalog_query_products('url_slug=); if(ecatalog_product_count() > 0){} ?> </code>

ecatalog_product_name()

ecatalog_product_name() : string

ecatalog_product_name will return the current product meta description Note: ecatalog_query_products should be called first Here is an inline example: <code> <html> <p><?php ecatalog_product_name();?> </p> </html> </code>

Returns

string —

| meta description

ecatalog_product_permalink()

ecatalog_product_permalink() : void

ecatalog_product_permalink will echo the current product permanent link Note: ecatalog_query_products should be called first Here is an inline example: <code> <html> <a href="<?php ecatalog_product_permalink()?">Link</a> </html> </code>

ecatalog_query_products()

ecatalog_query_products(  $str_query) : void

Query all the products in products table Here is an inline example: <code> <?php $products = ecatalog_query_products('url_slug='.$url); ?> </code>

Parameters

$str_query

ecatalog_the_product()

ecatalog_the_product() : void

ecatalog_the_product shift the array and give the ecatalog_current_product and product Here is an inline example: <code> <?php ecatalog_query_products('url_slug=); if(ecatalog_product_count() > 0){ ecatalog_the_product(); } ?> </code>

ecatalog_unhighlight()

ecatalog_unhighlight() : void

ecatalog_unhighlight unset session Here is an inline example: <code> <?php ecatalog_unhighlight(); ?> </code>

ecatalog_url_slug()

ecatalog_url_slug() : void

ecatalog_url_slug will echo the current product url slug Note: ecatalog_query_products should be called first Here is an inline example: <code> <html <a href="website.com/<?php ecatalog_url_slug() ?>">Product Name</a> <html> </code>

get_product_order_display()

get_product_order_display(  $order) : string

get_product_order_display will return the product order query Here is an inline example: <code> <?php $order = get_product_order_display($order); $qry = $db->query("SELECT * FROM `products` WHERE match(`product_name`) against ('$keyword') AND `product_status` = 'active' ".$order); ?> </code>

Parameters

$order

Returns

string —

| query order