Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

dropdown list in admin/array help please


Impudent1

Recommended Posts

I have been working on adding a products_quality display that will show a per item quality level.

 

So I created a products_quality field in the products field, I have it as set('10', '9', '8', '7', '6', '5', '4', '3', '2', '1') , not null, defaulting to 7. I then setup my product_info languages definitions, then added this to my product_info.php:

 

<?php

//quality

if (tep_not_null($product_info['products_quality'])) {

echo TEXT_PRODUCTS_QUALITY.' '.$product_info['products_quality'];

}

//quality

?>

 

I then setup my admin language files definition , then I started the admin/categories.php edits, of course doing the usual addition of the products_quality to the existing array and queries. the table addition of the following above the TEXT_PRODUCTS_NAME display section:

 

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

<tr bgcolor="#cdefdf">

<td colspan="2">

<table border="0" width="100%">

<tr>

<td class="main" align="left"><?php echo TEXT_PRODUCTS_QUALITY; ?></td>

<td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '1', '1') . ' ' . tep_draw_pull_down_menu('products_quality', $quality_array, $pInfo->products_quality ); ?></td>

</tr>

</table>

</td>

</tr>

 

the last following bit I added was just below the $tax_class_array section:

 

 

$quality_array = array('id' => '',

 

'1 It hurts to think about',

'2 Really Trashed',

'3 Poor',

'4 Better than Poor below G',

'5 Good',

'6 Better than Good below VG',

'7 Very Good',

'8 Better than VG below NM',

'9 Near Mint',

'10 Mint'

 

);

 

so now here is my real dilemna ;p

 

In the admin side when creating a new product I get the pulldown listing, BUT it is only a single digit.

 

I can edit the database addition to the products table to change from say '7' to '7 Very Good' and that will work, but in the admin side it still only shows me the single digits in the pulldown.

 

I know its something simple with the array but I have not a clue, I did do some research of course before posting and tried doing an associative array as well but that just resulted in blanks in the pulldown

 

ty in advance for any input you may have, once I clean this up a bit and get some of my other things working I will toss it and the qtvr link mod

 

Impudent1

LeapFrog Productions

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...