Tabbed Products

Views: 836

Results 1 to 4 of 4
24 Aug 2011, 3:14 PM
#1
jagall avatar

jagall

Zen Follower

Join Date:
Mar 2011
Location:
Ireland
Posts:
286
Plugin Contributions:
0

Tabbed Products

Hi I know this is not the thread but my query is more code related than anything else. Trying to display all products on the details tabs this includes two custom fields:

Product Code: NEBR3001
Delivery/Shipping Weight: 1.7kg
Manufactured by: Nestle
36 0.89

The input code is as follows:
// Preload Details
if ($bDetailsOnTab != false) {
$fmtDOT = '<div style="width:100%;">' . "\n";
$fmtDOT .= '<ul id="productDetailsList" class="floatingBox back">';
$fmtDOT .= (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n";
$fmtDOT .= (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n";
$fmtDOT .= (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n";
$fmtDOT .= (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n";
$fmtDOT .= ($product_info->fields['products_count']). "\n";
$fmtDOT .= ($product_info->fields['products_unit_cost']). "\n";

$fmtDOT .= '</ul>';
$fmtDOT .= "\n" . '<br class="clearBoth" />';
$fmtDOT .= "\n" . '</div>';

The 36 is the Count and
The 0.89 is unit price, (in red) all that is missing is that field name, and just cannot seem to work it in. I am sure it can be done as it iust could be hardcoded but I have tried so many different scenarios so not being a progammer it doesn't jump out at me. should read as follows:

Product Code: NEBR3001
Delivery/Shipping Weight: 1.7kg
Manufactured by: Nestle
Count: 36
RRP: 0.89

So near now.... please someone add the finishing touches!!! thanks:lookaroun

26 Aug 2011, 9:40 AM
#2
jagall avatar

jagall

Zen Follower

Join Date:
Mar 2011
Location:
Ireland
Posts:
286
Plugin Contributions:
0

Re: Tabbed Products

Hi All just to let ye know in case anyone comes across the same problem that I have got this sorted by using the following code allowed me to call in custom fields to the details tab in TPP:

$fmtDOT .= '<li>' .TEXT_PRODUCT_COUNT . $products_count .($product_info->fields['products_count']). "\n";
$fmtDOT .= '<li>' .TEXT_PRODUCT_UNIT_COST . $products_unit_cost .($product_info->fields['products_unit_cost']). "\n";

Sooo Happy, might have been a walk in the park for some but a mountain climbed for me!!!!:clap::clap::clap::clap::clap:

16 Jan 2012, 9:19 AM
#3
kapanadze avatar

kapanadze

New Zenner

Join Date:
Feb 2011
Posts:
2
Plugin Contributions:
0

Re: Tabbed Products

HI

this is what i'm using form tabs. it's working great the only problem is that if field is empty it still displays it . you can check it out on my site https://www.primesupplystore.com.

$fmtDOT .= '<li class="color1">' .'<b>Amps:</b> ' .($product_info->fields['products_amps']). '</li>' . "\n" ;

  • when i'm using withoug tabs i use this script. and it does hide empty fields. but doesn't' work in TPP page.
<?php $Amps="Amps: "; if (!empty($product_info->fields['products_amps'])) echo '<li>' . $Amps; echo $product_info->fields['products_amps'] . "\n"; ?>

please any help. how to hide empty fields. Thanks David :frusty:

16 Jan 2012, 8:55 PM
#4
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Tabbed Products

Did you try admin configuration layout settings

Categories with 0 Products Status set to 0?


Play with it long enough and you will break it.