Jump to content
Latest News: (loading..)

dremhmrk2

Members
  • Content count

    50
  • Joined

  • Last visited

1 Follower

Profile Information

  • Real Name
    Justin
  1. dremhmrk2

    Newsletter products, HTML email

    Is there possible way to send a test of a newsletter to only one email address before sending it out in bulk?
  2. Zelf, could you be retained for a fee to assist in integrating this with the OPC Module we're experiencing difficulties with? Or would it be better to contact the developers of OPC? (They already sort of gave up on assisting, as well.) OR Is there a source for programmers that have experience with this sort of thing?
  3. dremhmrk2

    One Page Checkout Support

    I'm still looking for help on my problem with integrating my payment module... Emailing for support returned nothing.
  4. dremhmrk2

    One Page Checkout Support

    I've emailed with no reply...
  5. Zelf, I think I have a new question not yet answered. I have been trying to set up the One Page Checkout contrib to streamline the checkout process. That contrib claims to be compatible with pretty much any payment gateway/module... but yours seems to be the exception! Your contrib works fine when using the standard checkout system but when using the OPC system, OPC returns an error: "There was an error setting payment method, please inform IT Web Experts about this error." Now, I know, i should contact them, which I have, but have gotten no response as of yet. Their OPC contrib works fine with paypal and googlecheckout, and even runs fine when using the "testing" credit card payment option that's part of osCommerce... I'm wondering what about your contrib would be different from say, the paypal and google ones, that would make this OPC contrib have issues "communicating." I inherited this website, and thought perhaps there was a problem in the way my predecessor installed Chargeit, but after reading your install instructions 15 times, I have everything right. Thanks for your time, if I can provide any information that will enhance your ability to assist me, pleaseeeee let me know. -Justin
  6. dremhmrk2

    One Page Checkout Support

    I am recieving this error when attempting to select a shipping method: "There was an error setting payment method, please inform IT Web Experts about this error" I AM able to select paypal, and am transfered to the paypal website, but if I select Credit Card, that error pops up. If I then try to continue checking out after the error, I get redirected back to chechout.php Any ideas? I currently have the "use one-page checkout" option set to false, so the standard shopping cart works currently, but really want to use the one page checkout. Thanks!
  7. Spooks, I'm back with another question. I'm loving the new_products.php that came with your contrib, but is there a way to make it either randomized between all products (sort of like a random featured page) or randomize a small selection of the recently modified products? We tend to add products in groups, with time between additions, and we don't want the same exact order of products to show up for a week or two between product additions... Is there a quick fix for this? I saw on page 46 the post about adapting your code to featured_products.php... Is this what I want to do? Do I need to install any additional contrib asides from the two pages listed on page 46 by one of your users? Thanks again for your help, you do a lot! Justin
  8. Spooks, I actualy did that already, I just basically copied your new_products.php file and added that line of sql we worked on. I love it now, it's perfect. Justin
  9. Spooks! You did it! You are my hero!!! I AM YELLING RIGHT NOW!!! I just need to tweak the css to fine tune the styling, but it's there! I think you should add this as an optional mod or step in your install instructions, a lot of people have installed the Product Extra Fields contrib but want a nice product listing. I actualy bet you would make it a nicer contrib, using the correct methods of calling the database and everything, maybe make your own, similar contrib that works well with yours. But anyways, thank you for all the help to get me back to a working product listing!!!! -Justin
  10. Spooks, I changed the specified lines of code, same exact problem. NOTHING happens, haha. This is a bit frustrating. I tried finding a support thread for Product Extra Fields contrib but I cannot find anything helpful. The only difference I really see, is that in my new_products.php, the defining of the variables takes place in it's on <?php> tag and the info is being ECHO'd in a unique <?php> tag as well. Here's my new_products.php file again. This works, so it has to hold the answer, somehow. <style> a { border: none; border-top-style: none; color:#000000; } </style> <?php $info_box_contents = array(); $i = 0; $info_box_contents[] = array('text' => sprintf(TABLE_HEADING_NEW_PRODUCTS, strftime('%B'))); //new contentBoxHeading($info_box_contents); /*if ( (!isset($new_products_category_id)) || ($new_products_category_id == '0') ) { $new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id where products_status = '1' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); } else { */ $new_products_query = tep_db_query("select distinct p.products_id, p.products_image, p.products_tax_class_id, if(s.status, s.specials_new_products_price, p.products_price) as products_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' and p.products_status = '1' order by rand() limit " . MAX_DISPLAY_NEW_PRODUCTS); // } $row = 0; $col = 0; $info_box_contents = array(); while ($new_products = tep_db_fetch_array($new_products_query)) { $new_products['products_name'] = tep_get_products_name($new_products['products_id']); $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="" width="" valign="top"', 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . $new_products['products_name'] . '</a>', 'text1' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>', 'text2' => $currencies->display_price($new_products['products_price'], tep_get_tax_rate($new_products['products_tax_class_id'])), 'text3' => $new_products['products_id']); $col ++; if ($col > 2) { $col = 0; $row ++; } } ?> <tr> <td width="100%"> <p> </p> <p align="center"><strong>Welcome to Topper Liquidators!</strong></p> <p> </p> </td> </tr> <table class="" border="0" cellspacing="0" cellpadding="0"> <tr> <?php foreach($info_box_contents as $contents) { //print_r($contents); foreach($contents as $newCont) : /*print_r($contents[0]['text']); print_r($contents[1]['text']); print_r($contents[2]['text']); print_r($contents[3]['text']); die;*/ ?> <?php // START: Extra Fields Contribution v2.0b - mintpeel display fix $extra_field_value = ""; $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf ON ptf.products_extra_fields_id=pef.products_extra_fields_id WHERE ptf.products_id=". (int)$newCont['text3']." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."') ORDER BY products_extra_fields_order"); $extra_fields = tep_db_fetch_array($extra_fields_query); $extra_field_name = $extra_fields['name']; if($extra_fields['value'] != "") $extra_field_value = stripslashes($extra_fields['value']); ?><td> <!-- products table starts here --><table class="list" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan='2' class="leftpad"><h2> <?php echo htmlspecialchars_decode(stripslashes($newCont['text'])); ?> </h2></td></tr> <tr> <td rowspan="2" valign="top" class="productimg"> <?php echo $newCont['text1']; ?> <?php echo '<br/><font size="2" color="#ff0000"><b>' . $extra_field_value .'</b></font>';?></td> <td align="left" class="rightpad"> </td> </tr> <tr> <td valign="bottom" align="right" class="rightpad"><br /> <br /> <span class="red"> </span></td> </tr> <tr> <td align="left" colspan='2' class="leftpad"><span class="btn_img"> </span><span style="padding:0 35px 0 45px"><span class="size22"> </span> <?php if(substr($newCont['text2'],0,1) != "$"){ ?> <span class="size12"><?php echo $newCont['text2']; ?></span> <?php } else{ ?> <span class="size35"><font size="2">Price: </font><?php echo $newCont['text2']; ?></span><?php } ?><span class="size22"></span></span></td> </tr> </table><!-- products table ends here --></td> <?php $i++; if($i % 4 == 0) echo "</tr><tr>"; endforeach; } ?> </table> <?php //new contentBox($info_box_contents); ?> The battle continues.
  11. Spooks, Thank you so much for replying. I have made your suggested changes by adding the small bit of CSS to the stylesheet and I have replaced the mentioned line with your modified code. It produces absolutely no results. No extra fields AND no errors. I cannot find anything additional in the source code. Just to make sure I was even editing the correct file, I changed $name to $xname to make sure it broke the site (which it did.) So I know I'm in the right file (product_listing.php.) Here is the current code: <?php /* $Id: product_listing.php, v 2.0 2009/10/17 22:49:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $graphic_bord = 'no'; // set to 'yes' if you have older 'graphic borders' and not 'easy graphic borders'. $cat_path = false; // set to true to include category paths in urls $no_drop = false; // set to true to remove resuls/page & sort order drop downs if (tep_not_null($HTTP_GET_VARS['sort'])) $_GET['sort'] = $HTTP_GET_VARS['sort']; $max_results = (tep_not_null($_GET['max']) ? $_GET['max'] : MAX_DISPLAY_SEARCH_RESULTS); if (PRODUCTS_PER_ROW == 'PRODUCTS_PER_ROW' || PRODUCTS_PER_ROW == 0 || LISTING_SWITCH == 'LISTING_SWITCH') { $to = 'Setup Error!\nPlease ensure you have run the\nProduct Listing Setup File.' ; print "<script>alert('$to');</script>"; } // sort order array if ($_GET['sort'] == '0d') $sort_array[] = array('id' => 0 . 'd', 'text' => DATE_ORDER); for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_MODEL . APHA_ORDER); break; case 'PRODUCT_LIST_NAME': $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_PRODUCTS . APHA_ORDER); break; case 'PRODUCT_LIST_MANUFACTURER': $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_MANUFACTURER . APHA_ORDER); break; case 'PRODUCT_LIST_QUANTITY': $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_QUANTITY . NUM_ORDER); break; case 'PRODUCT_LIST_WEIGHT': $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_WEIGHT . NUM_ORDER); break; case 'PRODUCT_LIST_PRICE': $sort_array[] = array('id' => $i+1 . 'a', 'text' => TABLE_HEADING_PRICE . NUM_ORDER); break; } } for ($i=0, $n=sizeof($column_list); $i<$n; $i++) { switch ($column_list[$i]) { case 'PRODUCT_LIST_MODEL': $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_MODEL . REVERSE_ALPHA_ORDER); break; case 'PRODUCT_LIST_NAME': $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_PRODUCTS . REVERSE_ALPHA_ORDER); break; case 'PRODUCT_LIST_MANUFACTURER': $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_MANUFACTURER . REVERSE_ALPHA_ORDER); break; case 'PRODUCT_LIST_QUANTITY': $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_QUANTITY . REVERSE_NUM_ORDER); break; case 'PRODUCT_LIST_WEIGHT': $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_WEIGHT . REVERSE_NUM_ORDER); break; case 'PRODUCT_LIST_PRICE': $sort_array[] = array('id' => $i+1 . 'd', 'text' => TABLE_HEADING_PRICE . REVERSE_NUM_ORDER); break; } } // Max Results Array for ($i=1, $n=10; $i<$n; $i++) { $max_display[] = array('id' => MAX_DISPLAY_SEARCH_RESULTS * $i, 'text' => MAX_DISPLAY_SEARCH_RESULTS * $i); } $max_display[] = array('id' => 1000000, 'text' => 'Show All'); // store GET vars $get_vars = ''; reset($_GET); while (list($key, $value) = each($_GET)) { if ( ($key != 'sort') && ($key != 'max') && ($key != tep_session_name()) && ($key != 'x') && ($key != 'y') ) { $get_vars .= tep_draw_hidden_field($key, $value); } } $top_nav = ((PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3')); $base_nav = ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')); $listing_split = new splitPageResults($listing_sql, $max_results, 'p.products_id'); $page_nav = '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">' . $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS) . '</td><td class="smallText" align="right">' . TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))) . '</td></tr></table>'; $drop = $no_drop ? '' : '<table border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td class="smallText">Results/Page: '. tep_draw_form('maxdisplay', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . $get_vars . (isset($_GET['sort']) ? tep_draw_hidden_field('sort', $_GET['sort']) : '') . tep_draw_pull_down_menu('max', $max_display, $_GET['max'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td><td class="smallText" align="right">Sort Order: ' . tep_draw_form('sorting', tep_href_link(basename($PHP_SELF), '', $request_type, false), 'get') . $get_vars . (isset($_GET['max']) ? tep_draw_hidden_field('max', $_GET['max']) : '') . tep_draw_pull_down_menu('sort', $sort_array, $_GET['sort'], 'onChange="this.form.submit();"') . tep_hide_session_id().'</form></td></tr></table>'; if ( ($listing_split->number_of_rows > (int)$max_results) && $top_nav ) echo $page_nav; if ($top_nav && ($listing_split->number_of_rows > 0)) echo $drop; function tep_get_category_name($category_id, $language_id) { $category_query = tep_db_query("select categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " where categories_id = '" . (int)$category_id . "' and language_id = '" . (int)$language_id . "'"); $category = tep_db_fetch_array($category_query); return $category['categories_name']; } function tep_get_manufacturer_name($manufacturer_id) { $manufacturers_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$manufacturer_id . "'"); $manufacturer = tep_db_fetch_array($manufacturers_query); return $manufacturer['manufacturers_name']; } function list_box_head($column_list) { for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_text = TABLE_HEADING_MODEL; $lc_align = 'center'; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = 'center'; break; case 'PRODUCT_LIST_PRICE': $lc_text = TABLE_HEADING_PRICE; $lc_align = 'right'; break; case 'PRODUCT_LIST_QUANTITY': $lc_text = TABLE_HEADING_QUANTITY; $lc_align = 'right'; break; case 'PRODUCT_LIST_WEIGHT': $lc_text = TABLE_HEADING_WEIGHT; $lc_align = 'right'; break; case 'PRODUCT_LIST_IMAGE': $lc_text = TABLE_HEADING_IMAGE; $lc_align = 'center'; break; case 'PRODUCT_LIST_BUY_NOW': $lc_text = (PRODUCT_LIST_OPTIONS == 'true' ? 'Product Options</td><td align="center" class="productListing-heading">' : '') . (strstr(LISTING_BUTTON, 'buy now')? TABLE_HEADING_BUY_NOW : TABLE_HEADING_DETAIL); $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($_GET['sort'], $col+1, $lc_text); } $list_box_contents[] = array('align' => $lc_align,'params' => 'class="productListing-heading"','text' => ' ' . $lc_text . ' '); } return ($list_box_contents); } // function list_head end function list_box_data($listing, $column_list) { global $PHP_SELF, $cPath, $cat_path; $currencies = new currencies(); $man_id = (tep_not_null($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : ''); $link = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $listing['products_id'] . ($man_id ? '&manufacturers_id='.$man_id : ($cPath && $cat_path ? '&cPath=' . $cPath : '')) ) . '"' . ($man_id || ($cat_path && $cat_path) ? ' rel="nofollow"' : '') . '>'; $buypic = (LISTING_BUTTON == 'buy now' ? 'button_in_cart.gif' : 'button_buy_now.gif'); $quantity_box = (PRODUCT_LIST_QUANTITY_BOX == 'true' ? 'Quantity: ' . tep_draw_input_field('cart_quantity','1','maxlength="5" size="5"') : ''); $form = tep_draw_form('cart_quantity', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','products_id')) . 'action=add_product')); $buytable = '<table class="buytable" border="0" width="100%" cellspacing="0" cellpadding="2"><tr><td valign="bottom" class="productListing-data">'; $buytableend = '</td></tr></table></form>'; $button = (LISTING_BUTTON == 'buy now & details' ? tep_draw_hidden_field('products_id', $listing['products_id']) . tep_image_submit($buypic, IMAGE_BUTTON_BUY_NOW, 'class="thm_buy_now"') . ' <span class="buy_now">|</span> ' . $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS, 'class="thm_buy_now"') . '</a>' : (strstr(LISTING_BUTTON, 'buy now') ? tep_draw_hidden_field('products_id', $listing['products_id']) . tep_image_submit($buypic, IMAGE_BUTTON_BUY_NOW) . '' : $link . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a>' )) ; if ($listing['products_price'] == 0) { $button = (strstr(LISTING_BUTTON, 'details') ? '<span class="buy_now"> </span>'. $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS) . '</a> ' : ''); $quantity_box = '';} if (isset($listing['products_quantity']) && !$listing['products_quantity']) { $button = '<span class="buy_now"> </span>'. $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS) . '</a> '; $quantity_box = '';} if (!strstr(PRODUCT_THUMBNAIL_VIEW, 'block')) { $list_box_temp = array('params' => 'class="list-block"'); for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $lc_align = ''; $params = 'class="productListing-data" '; switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $lc_align = 'center'; $lc_text = ' ' . $listing['products_model'] . ' '; break; case 'PRODUCT_LIST_NAME': $lc_align = ''; $lc_text = $link.'<b>' . $listing['products_name'] . '</b></a>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<br /><span class="short">' . $listing['short_desc'] . '</span>' : ''); break; case 'PRODUCT_LIST_MANUFACTURER': $lc_align = 'center'; $lc_text = ' <a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a> '; break; case 'PRODUCT_LIST_PRICE': $lc_align = 'right'; $lc_text = '<span class="productListing-list-price">'; $price = (function_exists(display_short_price)) ? $currencies->display_short_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) : $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])); if (tep_not_null($listing['specials_new_products_price'])) { $lc_text .= '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span> '; } else { $lc_text .= ($listing['products_price'] > 0 ? '' . $price . ' ' : ' ' . TEXT_POA); if (function_exists(tep_get_att_price)) $lc_text .= (tep_get_att_price($listing['products_id']) > 0 ? '+' : ' ') ; } $lc_text .= '</span>'; break; case 'PRODUCT_LIST_QUANTITY': $lc_align = 'right'; $lc_text = ' ' . $listing['products_quantity'] . ' '; break; case 'PRODUCT_LIST_WEIGHT': $lc_align = 'right'; $lc_text = ' ' . $listing['products_weight'] . ' '; break; case 'PRODUCT_LIST_IMAGE': $lc_align = 'center'; $lc_text = $link . tep_image(DIR_WS_IMAGES . (file_exists(DIR_WS_IMAGES . $listing['products_image']) ? $listing['products_image'] : 'no-image.jpg'), $listing['products_name'], PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT) . '</a>'; break; case 'PRODUCT_LIST_BUY_NOW': if (PRODUCT_LIST_OPTIONS == 'true' ) $params = 'class="productListing-data" width="'.((100/sizeof($column_list))*2).'%" colspan="2"'; $lc_align = 'center'; $button = $quantity_box . '<br />' . $button; $lc_text = $form . $buytable . (PRODUCT_LIST_OPTIONS == 'true' ? attribute_drop($listing['products_id'],$listing['products_tax_class_id']) . '</td><td align="center" class="productListing-data">' . $button : $button) . $buytableend; break; } $list_box_temp[] = array('align' => $lc_align, 'params' => $params, 'text' => $lc_text); } } else { $list_box_temp = array('params' => 'class="list-block"'); if (PRODUCT_LIST_IMAGE) { $list_box_temp[] = array('align' => 'center', 'params' => 'class="productListing-data" ', 'text' => $link . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT) . '</a>'); } $display =''; for ($col=0, $n=sizeof($column_list); $col<$n; $col++) { $last = ($n == ($col +1)); switch ($column_list[$col]) { case 'PRODUCT_LIST_MODEL': $text = $listing['products_model']; $display .= ($last ? '' : $text . '<br />'); break; case 'PRODUCT_LIST_NAME': $text = $link.'<b><u>' . $listing['products_name'] . '</u></b></a>' . ($listing['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<br /><span class="short">' . $listing['short_desc'] . '</span>' : ''); $display .= ($last ? '' : $text . '<br />'); break; case 'PRODUCT_LIST_MANUFACTURER': $text = '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $listing['manufacturers_id']) . '">' . $listing['manufacturers_name'] . '</a>'; $display .= ($last ? '' : $text . '<br />'); break; case 'PRODUCT_LIST_PRICE': $text = ($last ? '' : '<br />Price: ') . '<span class="productListing-list-price">'; $price = (function_exists(display_short_price)) ? $currencies->display_short_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) : $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])); if (tep_not_null($listing['specials_new_products_price'])) { $text .= '<s>' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($listing['specials_new_products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . '</span>'; } else { $text .= ($listing['products_price'] > 0 ? '' . $price : '' . TEXT_POA); if (function_exists(tep_get_att_price)) $display .= (tep_get_att_price($listing['products_id']) > 0 ? '+' : ' ') ; } $text .= '</span>' . ($last ? '' : '<br />'); $display .= ($last ? '' : $text . '<br />'); break; case 'PRODUCT_LIST_QUANTITY': $text = ($listing['products_quantity'] ? 'Stock = ' . $listing['products_quantity'] : 'Out of Stock'); $display .= ($last ? '' : $text . '<br />'); break; case 'PRODUCT_LIST_WEIGHT': $text = 'Weight = ' . $listing['products_weight'].WEIGHT_ABRV . ($last ? '' : '<br />'); $display .= ($last ? '' : $text . '<br />'); break; case 'PRODUCT_LIST_BUY_NOW': $button = $quantity_box . ($last ? '<br />' : ' ') . $button; $text = $form . $buytable . (PRODUCT_LIST_OPTIONS == 'true' ? '<div ' . ($last ? 'align="right"' : 'align="left"' ) . ' width="100%">' . attribute_drop($listing['products_id'],$listing['products_tax_class_id']) . '</div>' . $button : '<br />' . $button) . $buytableend; $display .= ($last ? '' : $text . '<br />'); break; } } $display .= ''; $list_box_temp[] = array('align' => 'left', 'params' => 'class="main" valign="top" ', 'text' => $display); $list_box_temp[] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top" ', 'text' => $text); } return ($list_box_temp); } // function list_box_data end function attribute_drop($products_id,$tax_class_id) { global $languages_id; $currencies = new currencies(); $atrib_drop = ''; $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_id='" . (int)$products_id . "'"); $products_attributes = tep_db_fetch_array($products_attributes_query); if ($products_attributes['total'] > 0) { $atrib_drop = '<table border="0" cellspacing="0" cellpadding="2">'; $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$products_id . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name"); while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { $products_options_array = array(); $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'"); while ($products_options = tep_db_fetch_array($products_options_query)) { $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']); if ($products_options['options_values_price'] != '0') { $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($tax_class_id)) .') '; } } $atrib_drop .= '<tr><td align="left" class="productListing-data" >' . $products_options_name['products_options_name'] . ':' . '</td><td align="left">' . tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array) . '</td></tr>'; } $atrib_drop .= '</table>'; } return $atrib_drop; } // function attribute_drop end // set initial values $thumbnail_view = (isset($_GET['list']) ? $_GET['list'] : PRODUCT_THUMBNAIL_VIEW); $empty_list=false; if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { $title_name = tep_get_manufacturer_name($_GET['manufacturers_id']); } else { $title_name = (!$category['categories_name'] && tep_not_null($_GET['cPath']) ? tep_get_category_name(substr($_GET['cPath'], strpos($_GET['cPath'],'_')+1),$languages_id) : ''); } $grid = strstr(PRODUCT_THUMBNAIL_VIEW, 'grid'); $gborders = function_exists(mws_boxHeader);//$gborders = false; $Tborder = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : mws_boxHeader('<big>'.$title_name.'</big>')); $Tborderend = (!$gborders ? '</td></tr></table>' : mws_boxFooter ()); $border2 = (!$gborders ? '<table class="infoBoxList" width="100%"><tr><td>' : ($graphic_bord == 'yes' ? mws_boxHeader('<big>'.$title_name.'</big>') : '')); $border2end = (!$gborders ? '</td></tr></table>' : ($graphic_bord == 'yes' ? mws_boxFooter() : '')); $form = tep_draw_form('cart_quantity', tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action','products_id')) . 'action=add_product')); if (tep_not_null($_GET['categories_id']) && $current_category_id == 0) $current_category_id = $_GET['categories_id']; // output selected display if (strstr($thumbnail_view, 'thumbnails')) { //thumbnail $row = 0; $col = 0; $border = (!$grid ? '<table class="infoBoxProducts" cellpadding="2" width="'.PRODUCT_LIST_WIDTH.'" height="'.PRODUCT_LIST_HEIGHT.'" ><tr><td valign="top">' : '<br />'); $borderend = (!$grid ? '</td></tr></table>' : ''); $style = (!$grid ? 'class="smallText"' : 'class="infoBoxGrid"'); $info_box_contents = array(); if ($listing_split->number_of_rows > 0) { $listing_query = tep_db_query($listing_split->sql_query);} else { $listing_query = tep_db_query($listing_sql); } if (tep_db_num_rows($listing_query)) { while ($products = tep_db_fetch_array($listing_query)) { if ($row == 0) { if (!$gborders && !$grid) $info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" valign="top"', 'text' => ' '); echo $Tborder;$row ++; } // build thumb $man_id = (tep_not_null($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : ''); $link = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id'] . ($man_id ? '&manufacturers_id='.$man_id : ($cPath && $cat_path ? '&cPath=' . $cPath : ''))) . '"' . ($man_id || ($cat_path && $cat_path) ? ' rel="nofollow"' : '') . '>'; $quantity = (PRODUCT_LIST_QUANTITY_BOX == 'true' ? 'Quantity: ' . tep_draw_input_field('cart_quantity','1','maxlength="5" size="5"') . '<br />' : ''); $image = (file_exists(DIR_WS_IMAGES . $products['products_image']) ? $products['products_image'] : 'no-image.jpg'); $addimages = (file_exists(DIR_WS_CLASSES . 'displayimages.php')); // Additional Images Present if ($addimages) { $image_query = tep_db_query( "SELECT ai.medium_images, ai.images_description, ai.popup_images, p.products_image_med, p.products_image_description FROM " . TABLE_ADDITIONAL_IMAGES . " ai, " . TABLE_PRODUCTS . " p WHERE ai.products_id=p.products_id and ai.products_id = '".(int)$products['products_id']."'"); $selected_image = tep_db_fetch_array($image_query); $image = ($selected_image['medium_images'] ? $selected_image['medium_images'] : ($selected_image['products_image_med'] ? $selected_image['products_image_med'] : ($selected_image['popup_images'] ? $selected_image['popup_images'] : $products['products_image']))); } $image = (!$grid && $column_list[0] == 'PRODUCT_LIST_IMAGE' ? '<br />' : '') . $link . tep_image(DIR_WS_IMAGES . $image, ($addimages ? (tep_not_null($selected_image['images_description']) ? $selected_image['images_description'] : (tep_not_null($selected_image['products_image_description']) ? $selected_image['products_image_description'] : $products['products_name'])) : $products['products_name']), PRODUCT_IMAGE_WIDTH, PRODUCT_IMAGE_HEIGHT) . '</a>' . '<br />'; $buypic = (LISTING_BUTTON == 'buy now' ? 'button_in_cart.gif' : 'button_buy_now.gif'); $button = (LISTING_BUTTON != 'none' && PRODUCT_LIST_BUY_NOW ? (LISTING_BUTTON == 'buy now & details' ? '<br />' . tep_draw_hidden_field('products_id', $products['products_id']) . $quantity . tep_image_submit($buypic, IMAGE_BUTTON_BUY_NOW, 'class="thm_buy_now"') . ' <span class="buy_now">|</span> ' . $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS, 'class="thm_buy_now"') . '</a><br /><br />' : (strstr(LISTING_BUTTON, 'buy now') ? '<br />' . tep_draw_hidden_field('products_id', $products['products_id']) . $quantity . tep_image_submit($buypic, IMAGE_BUTTON_BUY_NOW) . '<br /><br />' : '<br />'. $link . tep_image_button('button_details.gif', IMAGE_BUTTON_DETAILS) . '</a><br /><br />' )) : ' '); if ($products['products_price'] == 0) $button = (strstr(LISTING_BUTTON, 'details') ? '<br /><span class="buy_now"> </span>'. $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS, 'class="thm_buy_now"') . '</a> <br />' : ''); $name = $link . '<b>' . $products['products_name'] . '</b>' . '</a><br />'. ($products['short_desc'] && (PRODUCT_SHORT_DESC == 'true') ? '<br />' . $products['short_desc'] . '<br />' : ''); $price = (function_exists(display_short_price)) ? $currencies->display_short_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) : $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])); if (tep_not_null($products['specials_new_products_price'])) { $price = '<s>' . $currencies->display_price($products['products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($products['specials_new_products_price'], tep_get_tax_rate($products['products_tax_class_id'])) . '</span>'; } if (function_exists(tep_get_att_price)) $price .= (tep_get_att_price($products['products_id']) > 0 ? '+' : '') ; if (isset($products['products_quantity']) && !$products['products_quantity']) $button = (strstr(LISTING_BUTTON, 'details') ? '<br /><span class="buy_now"> </span>'. $link . tep_image_button('button_details_small.gif', IMAGE_BUTTON_DETAILS, 'class="thm_buy_now"') . '</a> <br />' : ''); $show_price = '<br /><font size="'.PRODUCT_PRICE_SIZE.'">' . ($products['products_price'] > 0 ? $price : TEXT_POA) . '<br /></font>'; $quantity = ($products['products_quantity'] ? 'Stock = '.$products['products_quantity'] : 'Out of Stock').'<br />'; $weight = 'Weight = '.$products['products_weight'].WEIGHT_ABRV.'<br />'; $model = $products['products_model'] . '<br />'; $manfact = '<a href="' . tep_href_link(FILENAME_DEFAULT, 'manufacturers_id=' . $products['manufacturers_id']) . '">' . $products['manufacturers_name'] . '</a><br />'; $display = $border; for ($disp=0, $n=sizeof($column_list); $disp<$n; $disp++) { switch ($column_list[$disp]) { case 'PRODUCT_LIST_IMAGE': $display .= '<table summary="" width="100%" ><tr><td style="text-align:center;" valign="middle" height="'.PRODUCT_IMAGE_VSPACE.'" >'.$image.'</td></tr></table>'; break; case 'PRODUCT_LIST_NAME': $extra_fields_text = ''; $extra_fields_query = tep_db_query(" SELECT pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef, ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf WHERE ptf.products_extra_fields_id=pef.products_extra_fields_id and ptf.products_id=". (int) $products['products_id'] ." and pef.languages_id=" . (int)$languages_id . " and ptf.products_extra_fields_value<>'' and pef.products_extra_fields_status <> 0 ORDER BY products_extra_fields_order"); while ($extra_fields = tep_db_fetch_array($extra_fields_query)) { $extra_fields_text .= '<tr><td class="smallText"><span class="xtra-field-name">' . $extra_fields['name'] . ': </span><span class="xtra-field-value">' . $extra_fields['value'] . '</span></td></tr>'; } $display .= '<table summary="" width="100%" ><tr><td class="thumbcontent" height="'.PRODUCT_NAME_VSPACE.'" >'.$name.'</td></tr>' . $extra_fields_text . '</table>'; break; case 'PRODUCT_LIST_MODEL': $display .= $model; break; case 'PRODUCT_LIST_MANUFACTURER': $display .= $manfact; break; case 'PRODUCT_LIST_PRICE': $display .= $show_price; break; case 'PRODUCT_LIST_QUANTITY': $display .= $quantity; break; case 'PRODUCT_LIST_WEIGHT': $display .= $weight; break; } } $display .= $borderend . $form . '<br />' . (PRODUCT_LIST_OPTIONS == 'true' ? attribute_drop($products['products_id'],$products['products_tax_class_id']) . $button : $button) . '</form>'; // thumb built $info_box_contents[$row][$col] = array('align' => 'center', 'params' => $style . ' width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" valign="top"', 'text' => $display ); $col ++; if ($col > PRODUCTS_PER_ROW-1) { $col = 0; $row ++; } } // prod loop } else {$empty_list=true; }// no products!! // got display if ($row) { $i = 0 ; $nbx = class_exists(noborderBox); if ($col > 0 && $row > 1 && $nbx && !$grid) { for ($i=0, $n=$col; $i < $n; $i++) { $last_row[0][$i] = $info_box_contents[$row][$i]; unset($info_box_contents[$row][$i]); } } if (!$i) {$col = 0;$row ++;$info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="'.(PRODUCTS_PER_ROW ? (100/PRODUCTS_PER_ROW) : '').'%" ', 'text' => ' '); } if ($nbx) new noborderBox($info_box_contents); else new contentBox($info_box_contents); if($i) new noborderBox($last_row); echo $Tborderend; } else {$empty_list=true; } } elseif (strstr($thumbnail_view, 'manufacturer')) { //manufacturer $row = 0;$col = 0; if (isset($_GET['manufacturers_id']) && tep_not_null($_GET['manufacturers_id'])) { $filterlist_sql= tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name, mi.manufacturers_description from " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where m.manufacturers_id = '" . (int)$_GET['manufacturers_id'] . "' and mi.languages_id = '" . (int)$languages_id . "'"); }else{ $filterlist_sql= tep_db_query("select distinct m.manufacturers_id, m.manufacturers_name, mi.manufacturers_description from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m left join " . TABLE_MANUFACTURERS_INFO . " mi on m.manufacturers_id = mi.manufacturers_id where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' and mi.languages_id = '" . (int)$languages_id . "' order by m.manufacturers_name"); } if (tep_db_num_rows($filterlist_sql)) { $rows = 0; while ($manufacturer = tep_db_fetch_array($filterlist_sql)) { $info_box_heading = array(); if ($rows) echo tep_draw_separator('pixel_trans.gif', '100%', '4'); echo $border2; $info_box_heading[0] = array('text' => '<big>'.$manufacturer['manufacturers_name'].'</big><br />'.(MANU_DESCRIPTION == 'true' ? $manufacturer['manufacturers_description'].'<br />' : '')); new infoBoxHeading($info_box_heading, false, false); //echo tep_draw_separator('pixel_trans.gif', '100%', '2'); $list_box_contents = array(); $list_box_contents[0] = (LISTING_HEADINGS == 'true' && !strstr(PRODUCT_THUMBNAIL_VIEW, 'block') ? list_box_head($column_list) : ''); if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query);} else { $rows = 0; $listing_query = tep_db_query($listing_sql); } while ($listing = tep_db_fetch_array($listing_query)) { if ($listing['manufacturers_id'] != $manufacturer['manufacturers_id']) continue; $list_box_contents[][] = array('text' => '<br />'); if (!$rows && $gborders) $list_box_contents = array(); $rows++; $cur_row = sizeof($list_box_contents); $list_box_contents[$cur_row] = list_box_data($listing, $column_list); for ($x=0, $n=sizeof($list_box_contents[$cur_row]); $x<$n; $x++) { $list_box_contents[$cur_row+1][$x] = array('align' => 'center', 'params' => 'class="separator" ', 'text' => '<br />'); } } $list_box_contents[$cur_row+1] = array(array('text' => '<br />')); if (!$rows && isset($_GET['manufacturers_id'])) { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); $rows++; } if ($rows) new productListingBox($list_box_contents); echo $border2end; } // man loop; $col = 0;$row ++;$info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => ' '); } else {$empty_list=true; } // no manufacturers!! } if ((!strstr($thumbnail_view, 'thumbnails') && !strstr($thumbnail_view, 'manufacturer')) || $empty_list) { //default listing if (MANU_DESCRIPTION == 'true' && tep_not_null($_GET['manufacturers_id'])) { $manufacturer_query = tep_db_query("select manufacturers_description from " . TABLE_MANUFACTURERS_INFO . " where manufacturers_id = '" . (int)($_GET['manufacturers_id']) . "' and languages_id = '" . (int)$languages_id . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); } $info_box_heading[0] = array('text' => '<big>'.$title_name.'</big>'.($manufacturer['manufacturers_description'] ? '<br />' . $manufacturer['manufacturers_description'] : '')); $list_box_contents = array(); $list_box_contents[0] = (LISTING_HEADINGS == 'true' && !strstr(PRODUCT_THUMBNAIL_VIEW, 'block') ? list_box_head($column_list) : ''); if ($listing_split->number_of_rows > 0) { $rows = 0; $listing_query = tep_db_query($listing_split->sql_query); while ($listing = tep_db_fetch_array($listing_query)) { $list_box_contents[][] = array('text' => '<br />'); if (!$rows && $gborders) $list_box_contents = array(); $rows++; $cur_row = sizeof($list_box_contents); $list_box_contents[$cur_row] = list_box_data($listing, $column_list); for ($x=0, $n=sizeof($list_box_contents[$cur_row]); $x<$n; $x++) { $list_box_contents[$cur_row+1][$x] = array('align' => 'center', 'params' => 'class="separator" ', 'text' => '<br />'); } } $list_box_contents[$cur_row+1] = array(array('text' => '<br />')); $empty_list = false; echo $border2; if ($title_name) new infoBoxHeading($info_box_heading, false, false); new productListingBox($list_box_contents); echo $border2end; //tep_draw_separator('pixel_trans.gif', '100%', '4'); } else { $list_box_contents = array(); $list_box_contents[0] = array('params' => 'class="productListing-odd"'); $list_box_contents[0][] = array('params' => 'class="productListing-data"', 'text' => TEXT_NO_PRODUCTS); new productListingBox($list_box_contents); } } if ($base_nav && !$empty_list) echo $drop; if (($listing_split->number_of_rows > (int)$max_results) && $base_nav) echo $page_nav; if (!strstr(PRODUCT_THUMBNAIL_VIEW, 'list') && LISTING_SWITCH != 'false' && !$empty_list) echo '<br /><span class="smalltext"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('list')). 'list='.(strstr($thumbnail_view, 'thumbnails') ? 'manufacturer' : 'thumbnails')) . '">' . (strstr($thumbnail_view, 'thumbnails') ? LIST_VIEW : THUMB_VIEW).'</a></span><br /><br />'; // echo '<hr>' . $listing_sql . '<hr>'; ?> It's odd that it's not throwing any codes AND not doing anything visible at all. I noticed something in your new code, the $extra_fields_text = ''; In my new_products.php which is working right, there is a "" as opposed to ''. Not sure if that matters. I also notice that you have changed some of the names of the variables, I'm sure this is intended by you, though. I feel like we're very close to getting it. -Justin
  12. He just came and asked what was taking so long, I told him that I was in contact with the original software engineer who worked on our product display plugin. He was shocked that I had reached "the creator" and wanted to know how much it was costing the company to be communicating with you :D I told him it costs nothing but takes time. Thank you sir
  13. Spooks, I'm really in a jam with this... Your grid view is so beautiful, I want to use it but my boss is demanding the extra fields, I'm getting heat from him pretty hard haha.
  14. Spooks, Regarding my product extra fields, how would YOU add ANY field to a page? I know the fields exist, and I know what they are called... how would I add them into the thumbnail grid layout?
×