Jump to content

jpipitone43

Members
  • Content count

    32
  • Joined

  • Last visited

Profile Information

  • Real Name
    Joe Pipitone
  1. I've installed the UltraPics contribution and now I'm trying to pull the image from the table "products" - the column that the image sits in is called "products_image_sm_1" and the image is called "bunny_sm_jpg.jpg" Can anyone tell me what's wrong with my code and tell me why no image is being displayed on the shopping_cart.php page? If I switch this code: $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . ' <tr>' . ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['products_image_sm_1'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . ' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>'; back to just $products[$i]['image'] it displays the image from the column "products_image" This is driving me crazy!! Does anyone see anything wrong with my SQL query or the code trying to pull down the image from products_image_sm_1? Below is a screen shot showing my db tables: /* $Id: shopping_cart.php,v 1.73 2003/06/09 23:03:56 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ require("includes/application_top.php"); require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHOPPING_CART); $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHOPPING_CART)); ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>"> <link rel="stylesheet" type="text/css" href="stylesheet.css"> <link rel="stylesheet" type="text/css" href="../styles.css"> <!--[if lte IE 6]> <link rel="stylesheet" href="ie6stylesheet.css" type="text/css" media="all" /> <![endif]--> </head> <center> <div id="wrapper" align="center"> <body> <?php if ($product_info['products_image_med']!='') { $new_image = $product_info['products_image_med']; $image_width = MEDIUM_IMAGE_WIDTH; $image_height = MEDIUM_IMAGE_HEIGHT; } else { $new_image = $product_info['products_image']; $image_width = SMALL_IMAGE_WIDTH; $image_height = SMALL_IMAGE_HEIGHT; } ?> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" background="images/bgline.gif"> <tr> <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="0"> <!-- left_navigation //--> <?php require(DIR_WS_INCLUDES . 'column_left.php'); ?> <!-- left_navigation_eof //--> </table></td> <!-- body_text //--> <td width="100%" valign="top"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_SHOPPING_CART, 'action=update_product')); ?> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="17" rowspan="12" align="left" valign="top"><img src="images/spacer.gif" alt="d" width="17" height="1"></td> </tr> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top" class="pageHeading"><?php echo HEADING_TITLE; ?></td> </tr> </table></td> </tr> <?php if ($cart->count_contents() > 0) { ?> <tr> <td valign="top"> <?php $info_box_contents = array(); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_REMOVE); $info_box_contents[0][] = array('params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_PRODUCTS); $info_box_contents[0][] = array('align' => 'center', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_QUANTITY); $info_box_contents[0][] = array('align' => 'right', 'params' => 'class="productListing-heading"', 'text' => TABLE_HEADING_TOTAL); $any_out_of_stock = 0; $products = $cart->get_products(); for ($i=0, $n=sizeof($products); $i<$n; $i++) { // Push all attributes information in an array if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { while (list($option, $value) = each($products[$i]['attributes'])) { echo tep_draw_hidden_field('id[' . $products[$i]['id'] . '][' . $option . ']', $value); $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, p.products_image, p.products_image_med, p.products_image_lrg, p.products_image_sm_1, p.products_image_xl_1, p.products_image_sm_2, p.products_image_xl_2, p.products_image_sm_3, p.products_image_xl_3, p.products_image_sm_4, p.products_image_xl_4, p.products_image_sm_5, p.products_image_xl_5, p.products_image_sm_6, p.products_image_xl_6 from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where p.products_id=pa.products_id and pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'"); $attributes_values = tep_db_fetch_array($attributes); $products[$i][$option]['products_options_name'] = $attributes_values['products_options_name']; $products[$i][$option]['options_values_id'] = $value; $products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name']; $products[$i][$option]['options_values_price'] = $attributes_values['options_values_price']; $products[$i][$option]['price_prefix'] = $attributes_values['price_prefix']; } } } for ($i=0, $n=sizeof($products); $i<$n; $i++) { if (($i/2) == floor($i/2)) { $info_box_contents[] = array('params' => 'class="productListing-even"'); } else { $info_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($info_box_contents) - 1; $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_checkbox_field('cart_delete[]', $products[$i]['id'])); $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . ' <tr>' . ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['products_image_sm_1'], $products[$i]['name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></td>' . ' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>'; if (STOCK_CHECK == 'true') { $stock_check = tep_check_stock($products[$i]['id'], $products[$i]['quantity']); if (tep_not_null($stock_check)) { $any_out_of_stock = 1; $products_name .= $stock_check; } } if (isset($products[$i]['attributes']) && is_array($products[$i]['attributes'])) { reset($products[$i]['attributes']); while (list($option, $value) = each($products[$i]['attributes'])) { $products_name .= '<br><small><i> - ' . $products[$i][$option]['products_options_name'] . ' ' . $products[$i][$option]['products_options_values_name'] . '</i></small>'; } } $products_name .= ' </td>' . ' </tr>' . '</table>'; $info_box_contents[$cur_row][] = array('params' => 'class="productListing-data"', 'text' => $products_name); $info_box_contents[$cur_row][] = array('align' => 'center', 'params' => 'class="productListing-data" valign="top"', 'text' => tep_draw_input_field('cart_quantity[]', $products[$i]['quantity'], 'size="4"') . tep_draw_hidden_field('products_id[]', $products[$i]['id'])); $info_box_contents[$cur_row][] = array('align' => 'right', 'params' => 'class="productListing-data" valign="top"', 'text' => '<b>' . $currencies->display_price($products[$i]['final_price'], tep_get_tax_rate($products[$i]['tax_class_id']), $products[$i]['quantity']) . '</b>'); } new productListingBox($info_box_contents); ?> </td> </tr> <tr> <td align="right" valign="top" class="main"><b><?php echo SUB_TITLE_SUB_TOTAL; ?> <?php echo $currencies->format($cart->show_total()); ?> </b></td> </tr> <?php if ($any_out_of_stock == 1) { if (STOCK_ALLOW_CHECKOUT == 'true') { ?> <tr> <td align="center" valign="top" class="stockWarning"><br> <?php echo OUT_OF_STOCK_CAN_CHECKOUT; ?></td> </tr> <?php } else { ?> <tr> <td align="center" valign="top" class="stockWarning"><br> <?php echo OUT_OF_STOCK_CANT_CHECKOUT; ?></td> </tr> <?php } } ?> <tr> <td valign="top"><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td class="main"><?php echo tep_image_submit('button_update_cart.gif', IMAGE_BUTTON_UPDATE_CART); ?></td> <?php $back = sizeof($navigation->path)-2; if (isset($navigation->path[$back])) { ?> <td class="main"><?php echo '<a href="' . tep_href_link($navigation->path[$back]['page'], tep_array_to_string($navigation->path[$back]['get'], array('action')), $navigation->path[$back]['mode']) . '">' . tep_image_button('button_continue_shopping.gif', IMAGE_BUTTON_CONTINUE_SHOPPING) . '</a>'; ?></td> <?php } ?> <td align="right" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . tep_image_button('button_checkout.gif', IMAGE_BUTTON_CHECKOUT) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <?php } else { ?> <tr> <td align="center" valign="top" class="main"><?php new infoBox(array(array('text' => TEXT_CART_EMPTY))); ?></td> </tr> <tr> <td height="268" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox"> <tr class="infoBoxContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td> <td align="right" valign="top" class="main"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td> <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '50', '1'); ?></td> </tr> </table></td> </tr> </table> </td> </tr> <?php } ?> </table> </form></td> <!-- body_text_eof //--> </table> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?//php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> </div> </center>
  2. Yes your code is very complete - would you be able to help me with my above question? I use TextWrangler for Mac - it is free.
  3. My question is concerning Ultrapics - I'm trying to display the product's bigger image on the shopping_cart.php page, not the product's main image. When a customer adds a product to the shopping cart, it should display the "bigger" image that is inserted through the backend. I've already modified the mysql query to the following on shopping_cart.php - is this correct? $attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, p.products_image_med, p.products_image_lrg from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where p.products_id=pa.products_id and pa.products_id = '" . (int)$products[$i]['id'] . "' and pa.options_id = '" . (int)$option . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . (int)$value . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . (int)$languages_id . "' and poval.language_id = '" . (int)$languages_id . "'"); Now, what do I need to change this to in order to display the product's bigger image, not the main image? Would this be MEDIUM_IMAGE_WIDTH or MEDIUM_IMAGE_HEIGHT? Is this the line I should be looking at? Thanks for any help - this is the last thing I need to do!!! $products_name = '<table border="0" cellspacing="2" cellpadding="2">' . ' <tr>' . ' <td class="productListing-data" align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">' . tep_image(DIR_WS_IMAGES . $products[$i]['image'], $product_info[$i]['name'], MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT) . '</a></td>' . ' <td class="productListing-data" valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '"><b>' . $products[$i]['name'] . '</b></a>';
  4. jpipitone43

    Rollover navigation (category) images

    Here's what I've commented out so far - this code taken from your categories.php page - for some reason I'm still seeing some sort of a break after the first category image that has a subcategory. Is there an easy way to get rid of that break? # if a subcategory, just write out the name in HTML text: //else if (isset($cPath_array) && in_array($counter, $cPath_array)) { # if subcategory is the one selected, wrap <b> tags round it: //$categories_string .= '<b>'; //$categories_string .= $tree[$counter]['name']; //$categories_string .= '</b>'; //} # else just write out the name with no bold tags: //else { // $categories_string .= $tree[$counter]['name']; //} # if a subcategory, close the subNav span tag: for ($i=0; $i<$tree[$counter]['level']; $i++) { $categories_string .= "</span>"; } $categories_string .= '</a><br>'; if ($tree[$counter]['next_id'] != false) { tep_show_category($tree[$counter]['next_id']); } } ?>
  5. jpipitone43

    Rollover navigation (category) images

    Great contribution. I just have a question - I want to get rid of the subcategory text - is there an easy way to do that? Also, I have some static images that need to be part of the navigation, such as an About Us item, as well as a Contact Us item. Is there an easy way using your contribution to add these static images to the navigation, and have them rollover and display the over state if they're clicked on? I appreciate any help. This is one of the last things I need to do to complete the site I'm working on.
  6. jpipitone43

    Product Listing in Columns v2.0

    Great contribution - is there a way to order the display of products? I only have 6 products in each category. I'm currently displaying them in 2 rows, with 3 items per row. Is there a way to change the order of the items that are displayed? I have a few items that I'd like to display first.....Is this possible? Thanks
  7. jpipitone43

    Drawing a graphic based on product info page

    I've got it to work: <?php switch ($product_info['products_id']) { case 28: echo "28"; break; case 29: echo "29"; break; } ?> However, can I draw an individual graphic above the drop down product attributes without repeating the numbers 28 or 29? It seems to loop and re-write the statement.....
  8. I was wondering if it was possible to draw a specific graphic which I've created on the right hand side of my page depending on which product info page I'm on. For example, if the path to the product info page is: product_info.php?cPath=21&products_id=28 Would I be able to write a simple if/else statement or a case statement that simply says: if cPath=21&products_id=28 then draw image product28_options.jpg Is this at all possible? Thanks for any help!
  9. jpipitone43

    Display images on top of options (drop down)

    Does anyone know if this can be done? I'm still trying to figure out how to add the swatch - it can even be a plain image. No pop ups necessary, I just need to show an image above the drop down list of options.
  10. I am working on a cart right now, and each product has the following options, each with a list of 6-7 product options each: 1) alternate ink color palette choices 2) alternate background color choices 3) alternate ribbon choices The client wants us to display an image at the top of each drop down, which shows a preview swatch (I've attached to this post) The color swatches need to display to the right of the product description, which I'll need to place in a new column on the right. Each color needs to be clickable to display a larger swatch pop up image. Can this be done? I noticed there was a product options contribution that allows you to display the product options, but they are selectable via a radio button. I need this to function like a drop down, please see the screen shot attached - help!!!
  11. I'm using the Rollover Category Image contribution: http://addons.oscommerce.com/info/4267 The store I'm working on has 4 main categories, the rest of the links need to be: "Shop by category" "Order Samples" "About Us" "Contact Us" Is there a way to add more items to the same menu that is located in the Categories box, and also have their On states active when that page is active? These 4 links will be regular content page items, they won't link to individual categories. Only the 4 main categories will link. Right now, the 4 main categories I have working with images rather than text. Is there an easy way to modify this code and add additional links to the same menu? Thanks for any help - This is one of the last steps necessary to finish this storefront! -Joe
  12. jpipitone43

    Product Customizer

    Right - this I know - but my question is, can I have these changes reflected on the screen visually - for example, place a blue ribbon on top of a red / white color scheme - some companies have this functionality on their website but it looks like it was custom built.
  13. jpipitone43

    Product Customizer

    I have a client who would like to sell birth announcements. Each birth announcement comes in a variety of color schemes, with a variety of ribbon options for each, as well as the option to choose a typeface and an illustration. Is there a contribution out there for osCommerce that allows for a product configurator / customization type functionality? I'd like to allow the customer to select a color scheme, ribbon color, and illustration, among others. It would be nice to see the changes in real time, but that's a stretch. Is there something out there that would allow for this kind of configuration and display? It doesn't necessarily have to be displayed in real time either. Thanks for any help!!! I've been searching desperately for this functionality!
×