Forums / General Questions / Help with UPC/ISBN Product Fields

Help with UPC/ISBN Product Fields

Views: 2,292

Results 1 to 6 of 6
8 Jan 2011, 6:13 PM
#1
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Help with UPC/ISBN Product Fields

I have recently installed the UPC/ISBN product fields add on http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=651

I have installed everything and applied the SQL patch. However, the UPC and or ISBN fields do not display on the tpl_product_info_display.php page. The install instructions state that you should insert two lines of code where you want the fields to be displayed but I find that the code is different than that of the rest of the section and I was hoping to get some help/input.

The following code is default:

<!--bof Product details list --> <?php if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?> <ul id="productDetailsList" class="floatingBox back"> <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT . $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>' : '') . "\n"; ?> <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?> </ul> <br class="clearBoth" /> <?php } ?> <!--eof Product details list -->

I have to insert the following two lines:

<?php if (!empty($product_info->fields['products_upc'])) echo '<p>UPC: ' . $product_info->fields['products_upc'] . '</p>'; ?> <?php if (!empty($product_info->fields['products_isbn'])) echo '<p>ISBN: ' . $product_info->fields['products_isbn'] . '</p>'; ?>

I have tried a few times and have been unsuccessful... so if there is any input I would appreciate it!

8 Jan 2011, 6:42 PM
#2
davewest avatar

davewest

Totally Zenned

Join Date:
Dec 2007
Location:
Payson, AZ
Posts:
1,075
Plugin Contributions:
7

Re: Help with UPC/ISBN Product Fields

Boatersplanet:

I have to insert the following two lines:

<?php if (!empty($product_info->fields['products_upc'])) echo '<p>UPC: ' . $product_info->fields['products_upc'] . '</p>'; ?> <?php if (!empty($product_info->fields['products_isbn'])) echo '<p>ISBN: ' . $product_info->fields['products_isbn'] . '</p>'; ?>

I have tried a few times and have been unsuccessful... so if there is any input I would appreciate it!
The code on the default template use a unordered list.. replace the <p> and </p> with <li> and </li> and place the code above the </ul> tag..

<?php if (!empty($product_info->fields['products_upc'])) echo '<li>UPC: ' . $product_info->fields['products_upc'] . '</li>'; ?>
 <?php if (!empty($product_info->fields['products_isbn'])) echo '<li>ISBN: ' . $product_info->fields['products_isbn'] . '</li>'; ?>
```Also, if the product field UPC or ISBN is empty, they wont show at all...

Dave
Always forward thinking... Lost my mind!

8 Jan 2011, 8:25 PM
#3
boatersplanet avatar

boatersplanet

New Zenner

Join Date:
Aug 2010
Location:
Washington, DC
Posts:
66
Plugin Contributions:
0

Re: Help with UPC/ISBN Product Fields

terrific... worked perfectly... thank you

29 Nov 2012, 7:11 PM
#4
stumpyhead avatar

stumpyhead

New Zenner

Join Date:
Nov 2012
Posts:
4
Plugin Contributions:
0

Re: Help with UPC/ISBN Product Fields

davewest:

The code on the default template use a unordered list.. replace the <p> and </p> with <li> and </li> and place the code above the </ul> tag..

<?php if (!empty($product_info->fields['products_upc'])) echo '<li>UPC: ' . $product_info->fields['products_upc'] . '</li>'; ?> <?php if (!empty($product_info->fields['products_isbn'])) echo '<li>ISBN: ' . $product_info->fields['products_isbn'] . '</li>'; ?>

Hi

I used the above code as instructed but still nothing is displaying.  I've used easy populate to enter the data into the database; when I exported my database .csv v_products_upc wasn't present even though the fields had been created in database, so I created a custom field in easypopulate, now export it's there and when I upload/insert the .csv, the ucp fields are filled in and I can see them in my admin>catelog... so the data is there but???

I am using zc 1.5.1 though :/

Also, a little off topic but how would I display the upc on orders/invoices?

Any pointers would be greatly appreciate

regards
4 Dec 2012, 11:16 AM
#5
stumpyhead avatar

stumpyhead

New Zenner

Join Date:
Nov 2012
Posts:
4
Plugin Contributions:
0

Re: Help with UPC/ISBN Product Fields

Hi

I got that working as described and thanks muchly for the mod etc. I wonder if you would be so kind as to tell me how to display upc/isbn's on orders? (BE & FE). Any tips on what files to edit would be awesome.

thanks again

regards

5 Dec 2012, 12:53 PM
#6
stumpyhead avatar

stumpyhead

New Zenner

Join Date:
Nov 2012
Posts:
4
Plugin Contributions:
0

Re: Help with UPC/ISBN Product Fields

Ok

So I edited /admin/includes/classes/order.php

  $index = 0;
  $orders_products = $db->Execute("select orders_products_id, products_id, products_name, products_model,
                                          products_price, products_tax, products_quantity, **products_upc, **

and includes/classes/order.php

$this->products[$index] = array('qty' => $new_qty,
'id' => $orders_products->fields['products_id'],
'name' => $orders_products->fields['products_name'],
'model' => $orders_products->fields['products_model'],

'upc' => $orders_products->fields['products_upc'],

                                    'tax' => $orders_products->fields['products_tax'],
                                    'price' => $orders_products->fields['products_price'],
                                    'onetime_charges' => $orders_products->fields['onetime_charges'],
                                    'final_price' => $orders_products->fields['final_price'],

I'm not a coder in any way shape or form so any help would be really appreciated - I'm trying like mad to have upc show in the orders so I can find the products in my supplier's website.

Please help I'm desperate.

thanks again

regards