Isn’t there a memory variable that defined when an individual product is called ?
Once a user clicks on a product is that (item_id) setup in memory as a variable ?
Or maybe I am missing that ‘SingleProduct’ is that memory variable you are referring to.
Just to make sure we are on the same page, the problem I am trying to solve is to link a specific product to a Post or Custom Post which contains a product review. This means I need to pass the product id (item_id) to the Review code if a new review is being stored so it is linked to the correct Review.
I guess what I am missing is that once I click on an individual product, UPCP already has to know the item_id because I am viewing the product. Is that item_id able to be viewed by either an existing shortcode or by creating my own shortcode using the $_GET function ?
add_shortcode("product-catalogue", "Insert_Product_Catalog");
function Insert_Minimal_Products($atts) {
global $wpdb, $items_table_name, $catalogue_items_table_name;
// Get the attributes passed by the shortcode, and store them in new variables for processing
extract( shortcode_atts( array(
"catalogue_url" => "",
"product_ids" => "",
"catalogue_id" => "",
"category_id" => "",
"subcategory_id" => "",
"product_count" => 3,
"products_wide" => 3),
$atts
)
);