Context: Function

Functions

gdpc_get_linked_products

gdpc_get_linked_products($post_id = 0) $post_id: post to get linked products for. If zero, current post is used. Get all products linked to this post. You will get array where key is the post type name for product type and it will have array for each one with the value ‘list’ that will have products inside (as […]

gdpc_products_compare_url

gdpc_products_compare_url($product_type,$products=array(), $sort = true) $product_type: product type for compare link. $products: products to compare, array with product ID’s. $sort: function should sort products in URL. Get URL to the products compare page. Example [php]echo gdpc_products_compare_url(‘phone’,array(34,56,122));[/php]

gdpc_query

gdpc_query() Get object attached to wp_query with current products page properties. Function returns: object with settings or false if it is not products related page.

gdpc_compare_box_embed_no_cache

gdpc_compare_box_embed_no_cache($product_type = ”, $echo = true, $class = ”) $product_type: name of the product type for compare box. $echo: echo content or return it as a string. $class: extra CSS class to apply to the box. Display compare box on the page. If you leave product type empty, plugin will attempt to detect product type […]

gdpc_compare_box_embed

gdpc_compare_box_embed($product_type = ”, $echo = true, $class = ”) $product_type: name of the product type for compare box. $echo: echo content or return it as a string. $class: extra CSS class to apply to the box. Display compare box on the page. If you leave product type empty, plugin will attempt to detect product type […]

gdpc_get_query

gdpc_get_query() Returns the object with GD Products Center specific query variables if the current page is GDPC related and displayed through main query. Object contains following properties is_single: single product page is_archive: products archive is_compare: products comparison is_products: products types page single_page: single page name product_type: products type current_page: current page in archive If page […]

gdpc_add_product_link

gdpc_add_product_link($product_id, $link_url, $link_title) $product_id: product to add video to $link_url: url for the link $link_title: title for the link Add link to product. Returns true or false on operation success.

gdpc_add_product_video

gdpc_add_product_video($product_id, $video_url, $video_title = ”) $product_id: product to add video to $video_url: url for the video $video_title: optional title for the video Add video to product. Returns true or false on operation success.