->commerce_price ->value(); $commerce_price = commerce_currency_format( $commerce_price_data['amount'], $commerce_price_data['currency_code'] );*/ $uid = arg(1); if (empty($uid)) { global $user; $uid = $user->uid; } $product_id = $row->product_id; $product_nid = fck_get_node_id($product_id); $jersey_print = fck_jp_get_wishlist_data($product_id, $uid, TRUE); $autograph = $jersey_print['field_autograph']; $badge = $jersey_print['field_superliga_badge']; $player = is_object($jersey_print['field_players']) ? $jersey_print['field_players']->tid : 0; $label = $jersey_print['field_text_label']; $number = $jersey_print['field_text_number']; $url = fck_generate_product_url($product_nid, $product_id, $autograph, $badge, $player, $label, $number); $title = l($output, $url); $jersey_print_output = ''; if (!empty($jersey_print)) { // $product = commerce_product_load($product_id); $jersey_print_data = $product->field_jersey_print['und'][0]['set_details']; $jersey_print_values = $jersey_print; $jersey_print_output = theme('fck_jp_attributes', array('jersey_print_values' => $jersey_print_values, 'jersey_print_data' => $jersey_print_data)); } print $title; print $jersey_print_output;
if (!empty($jersey_print)) { // $product = commerce_product_load($product_id); $jersey_print_data = $product->field_jersey_print['und'][0]['set_details']; $jersey_print_values = $jersey_print; $jersey_print_output = theme('fck_jp_attributes', array('jersey_print_values' => $jersey_print_values, 'jersey_print_data' => $jersey_print_data, 'show_price' => FALSE)); $jersey_print_price = fck_jp_get_wishlist_data($product_id, $uid); $price = fck_jp_get_wishlist_price($product_id, $uid, $jersey_print_price); $autograph = $jersey_print['field_autograph']; $badge = $jersey_print['field_superliga_badge']; $player = is_object($jersey_print['field_players']) ? $jersey_print['field_players']->tid : 0; $label = $jersey_print['field_text_label']; $number = $jersey_print['field_text_number']; $url = fck_generate_product_url($product_nid, $product_id, $autograph, $badge, $player, $label, $number); } else { $url = fck_generate_product_url($product_nid); } $product = entity_load_single('commerce_product', $product_id); $wrapper = entity_metadata_wrapper('commerce_product', $product); // price // if (empty($price)) { $commerce_price_data = $wrapper->commerce_price->value(); $price = commerce_currency_format($commerce_price_data['amount'], $commerce_price_data['currency_code']); } // image $first_image = $wrapper->field_product_images[0]->value(); $image_url = ''; if (isset($first_image['uri'])) { $image_url = image_style_url('product_list_small', $first_image['uri']); }