Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

jwatts

Archived
  • Posts

    35
  • Joined

  • Last visited

Posts posted by jwatts

  1. Hi Justin

     

    USU5 like the 2005 original uses -p-123 (retained for compatibility), there has to be some method of passing the products_id/cPath through to the osCommerce script .. there are other seo url contributions that use pure text .. BUT .. pure text is an intangible/unreliable whereas e.g. products_id/cPath are unique as dictated by MySQL autoincrement.

     

    So the answer to the first question is that they are essential.

     

    Regarding path based uris ... www.mysite.com/my/great/product/p/123 I have purposely NOT included this feature for two reasons ..

     

    Firstly it is effectively a lie .. that directory structure does not exist and the best of the bots are not stupid (well they are they are bots but you get the idea).

     

    Secondly it is now suggested that Google bot is stepping back through directory paths and as these paths are not real is likely to create problems.

     

    I thought about it and I know that software such as Drupal use such paths but decided against it.

     

    Hi Robert,

     

    Thank you for your response! That was very insightful and informative. For the path based uris, would the second example I gave be feasible? Having it come out like /catalog/category-subcategory-product.html?

     

    The reason I ask - say my site sells candles, and they are displayed/named by scent. So when you click on, say, the 'apple' scented candle, the URL is just /catalog/apple-p-123.html, which doesn't help with the SEO too much. But say that 'apple' product is in a 'candle' category, having it come out /catalog/candle-apple-p-123.html would help more.

     

    Let me know what you think when you get a moment.

     

    Thanks again! =)

    Justin

  2. Hi Robert,

     

    All is running smoothly with this contribution! I have 2 general questions about its performance...

     

    1 - Does it have to have the product id appended to the URL (is this a security measure in case 2 products have the same name)? For example, /catalog/product-name-p-123.html. Can the "-p-123" be removed?

     

    2 - Is it possible to have each category as a "subdirectory" for the URL, or somehow include them in the URL? For example, a product "product-name" in the subcategory "subcategory" in the main category "category" would come out like /catalog/category/subcategory/product-name.html or /catalog/category-subcategory-product-name.html?

     

    I wasn't sure if either of those could be a setting to change in .htaccess, or if that would require a lot more coding.

     

    Thanks again for a great contribution!

    Justin

  3. Hmmm that looks ok as it is actually .. when installed add a product to cart from product_listing (long line of products) then in the cart click continue which should take you back to the list of products.

     

    Hover over all the products and make sure they don't all have the same products_id.

     

    this mod was actually nothing to do with this module but eradicated a bug in osCommerce . . the bug only showed itself with ultimate seo urls 2 and your code may well have been a fix for it already.

     

    I added a product from the product_listing page. Then in the cart I clicked continue and it brought me back to the product info page (not the product listing page). Hmmm... not sure why... do you have any thoughts on that?

     

    Aside from that, by the way, the contribution works great! =D Many thanks again!

    Justin

  4. Hi Robert,

     

    I am very excited about implementing your contribution in my store. Your installation instructions are awesome!! I do have a fairly modified store already, but so far I haven't run into any real problems with the installation... except for this... ;)

     

    In install_modify_files.html, step 6, you are supposed to modify the 'buy now' button with your code.

     

    I replaced the 'buy now' button with a 'details' link that will take users to the product info page. It may be a little much to ask you, since this is my own modded code, but would you be able to tell me how to change this line (this is the one that I replaced the original 'buy now' code with):

     

    $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '" style="display:block; padding-bottom:10px; padding-top:2px;">' . tep_image_button('button_buy_now.gif', 'Details') . '</a>';

     

    I understand if that's beyond the scope of your support, but I figured I'd ask! Thanks again!

    Justin

  5. Hello,

     

    I'm looking to give international users some sort of shipping credit. I've been looking around the contributions and forums, and have tried Easy Discounts (which I was unable to get working), but can't find anything that really helps.

     

    At checkout (checkout_confirmation), I want the cart to recognize the customer is in an international zone, and give a $10.00 discount.

     

    Any help would be grand. Thanks!

  6. Help me!!!!!!

     

    I want install the version 2.2 of Product Listing in Columns,but in the package ,the new_install.txt,you said:"1. First off, the database change.Run the included list_multi.sql file", I don't know how to run or how to included list_multi.sql, and I also got this error"1054 - Unknown column 'p.products_id' in 'on clause'

     

    select count(p.products_id) as total from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id, products_to_categories p2c left join specials s on p.products_id = s.products_id where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '1' and p2c.categories_id = '16'

    can somebody help me ?????? I need your help ,Thanks a lot!!!!!!!!!!!!!!

     

    Your best bet is to use something like phpMyAdmin, which may already be installed in your hosting account. There is an 'SQL' button you click which will display a text box. Copy and paste the contents of list_multi.sql into that and click 'Go'. All should be done!

     

    (Be sure to backup your database first though... just in case something goes wrong).

  7. Where do we find where the declined URL is defined? I can't find that option in the authorizenet settings area.

     

    I believe what that means is when you get looped back to the payment screen, make sure the URL is checkout_payment.php (in the address bar). Does it look something like "www.yoursite.com/catalog/checkout_payment.php?payment_error=This+is+your+error"?

     

    I was having this problem using the standard Authorize.net module that came with oscommerce, but when i went with the contribution of the Authorize.net AIM module, that problem was fixed. Which are you using?

  8. Thanks for this contribution Hadir, I was able to get it installed and working in no time.

     

    Does anyone have a mod that allows individual specials prices to be assigned to each option? Currently I can only set the special on the base item and change the other option prices manually, but you lose the original prices doing this.

     

    Did you (or anyone) ever find a solution to this problem? I am having the same issue - the base price is discounted with the special price, but all the prices in the attribute drop-down stay the same. Does anyone know how to make all the prices in the attribute dropdown reflect the 'specials' price?

     

    Many thanks!!

  9. Hi All,

     

    I need my customers who have an order over $100 to pay NO shipping, but any other orders under $100 to be a flat shipping rate of $10.

     

    So basically if a customer spends over $100 they get shipping for free!

     

    Any help would be much appreciated.

    I have had a look through the Contributions but couldn't see what I was after... maybe Im looking for the wrong thing.

     

    Could anyone help me here... Thanks...

     

    I just installed the contribution "Free Shipping W/ Minimum Amount" which does exactly that.

    It's found here: http://www.oscommerce.com/community/contributions,146.

     

    Keep your 'Flat Rate' shipping module installed, set to $10.

    Then install this other module and set it at $100.

     

    If your customer's order total doesn't reach $100, they will only see the flat rate. If they do reach $100, they will see both options, and the free option will already be selected.

  10. Hello everyone.

     

    Something strange happened when I installed this mod. I followed the instructions and the mod works fine. The problem is when i click on file manager. I get this error:

    Did I miss a step somewhere?

     

    Just taking a guess, since it involves the document root...

     

    6. Open your /catalog/admin/includes/configure.php file and set DOCUMENT_ROOT TO $DOCUMENT_ROOT  DO THIS!!  IT IS VERY IMPORTANT FOR YOUR SUCCESS.  IF YOU DO NOT FLLOW THIS YOU WILL HAVE PROBLEMS!

     

    Hope this helps =)

  11. Does anyone know how to incorporate this great contribution (i'm using v2.1) with the Product Sort v1.6 contribution. One of the files you need to edit is the product_listing.php file, and i'm not sure how to add the code to the new product_listing_col.php file.

     

    Here are the instructions for a fresh product_listing.php file...

     

    >>> FIND THIS:
    
      case 'PRODUCT_LIST_BUY_NOW':
    	$lc_text = TABLE_HEADING_BUY_NOW;
    	$lc_align = 'center';
    	break;
    
    >>> ADD THE FOLLOWING 4 LINES *AFTER* THE ABOVE:
    
      case 'PRODUCT_SORT_ORDER':
    $lc_text = TABLE_HEADING_PRODUCT_SORT;
    $lc_align = 'center';
    break;
    
    
    
    2. Approximately line 131-134,
    
    >>> FIND THIS:
    
    	  case 'PRODUCT_LIST_BUY_NOW':
    		$lc_align = 'center';
    		$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
    		break;
    
    >>> ADD THE FOLLOWING 4 LINES *AFTER* THE ABOVE:
    
    	  case 'PRODUCT_SORT_ORDER';
    		$lc_align = 'center';
    		$lc_text = ' ' . $listing['products_sort_order'] . ' ';
    		break;

     

    Since those 2 case statements aren't there, or are way different, i'm not sure where or how to insert that code :( Any help would be VERY much appreciated! Thank you so much!

  12. I installed the Product Sort v1.6 contribution on a dev cart, and it worked great! Awesome contribution! Now i am trying to add it to a cart that is already modified with the Product Listing in Columns contribution, where, specifically, the catalog/includes/modules/product_listing.php (which is now actually product_listing_col.php) is completely changed. I'm wondering if anyone can figure where or how to insert the code for this. Any help is HUGELY appreciated! =)

     

    First, these are the instructions for editing a fresh product_listing.php file...

     

    Add...

     

    case 'PRODUCT_SORT_ORDER':
    $lc_text = TABLE_HEADING_PRODUCT_SORT;
    $lc_align = 'center';
    break;

     

    ...after...

     

    case 'PRODUCT_LIST_BUY_NOW':
    	$lc_text = TABLE_HEADING_BUY_NOW;
    	$lc_align = 'center';
    	break;

     

    ... at around line 58, and then add...

     

    case 'PRODUCT_SORT_ORDER';
    		$lc_align = 'center';
    		$lc_text = ' ' . $listing['products_sort_order'] . ' ';
    		break;

     

    ...after...

     

    case 'PRODUCT_LIST_BUY_NOW':
    		$lc_align = 'center';
    		$lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
    		break;

     

    ... at around line 131.

     

    NOW, this is the new product_listing_col.php file that replaced product_listing.php for the product listing in columns contribution...

     

    //bof product listing with attributes
     $list_box_contents = array();
     $list_box_contents[] = array('params' => 'class="productListing-heading"');
     $cur_row = sizeof($list_box_contents) - 1;
    
     for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
    switch ($column_list[$col]) {
      case 'PRODUCT_LIST_MULTIPLE':
    	$add_multiple = "1";
    	echo '<form name="buy_now_" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=add_multiple', 'NONSSL') . '">';
    	break;
    
    	}}
    //eof product listing with attributes
    ?>
    <?php
    $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id');
    
    if ( ($listing_split->number_of_rows > 0) && ( (PREV_NEXT_BAR_LOCATION == '1') || (PREV_NEXT_BAR_LOCATION == '3') ) ) {
    ?>
    <table border="0" width="100%" cellspacing="0" cellpadding="2">
    <tr>  <td class="smallText"><?php echo $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
     <td class="smallText" align="right"><?php echo TEXT_RESULT_PAGE . ' ' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info', 'x', 'y'))); ?></td>
    </tr>
    </table>
    <?php
    }
    
    $list_box_contents = array();
    
    if ($listing_split->number_of_rows > 0) {
     $row = 0;
     //$rows = 0;
     $column = 0;
     $listing_query = tep_db_query($listing_split->sql_query);
    while ($listing = tep_db_fetch_array($listing_query)) {
    
    // WARNING the code assumes there are three products per row. To use a different number change the number
    // at line 240: if ($column >= 3) and the code to fill up the table row below that accordingly
    // $counter = $row;
    // $class_for_buy_now = 'class="productListing-odd"';
    // $list_box_contents[$row] = array('params' => 'class="productListing-odd"');
    
     $rows++;
    
    if (($rows/2) == floor($rows/2) && ($row > $counter)) {
      $list_box_contents[$row] = array('params' => 'class="productListing-even"');
      $class_for_buy_now = 'class="productListing-even"';
      $counter = $row;
    } else {
     if ($row > $counter) {
      $list_box_contents[$row] = array('params' => 'class="productListing-odd"');
      $class_for_buy_now = 'class="productListing-odd"';
      $counter = $row;
     }
    }
    
    $product_contents = array();
    
    for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
      $lc_align = '';
    
      switch ($column_list[$col]) {
    	case 'PRODUCT_LIST_MODEL':
    	  $lc_align = '';
    	  $lc_text = ' ' . $listing['products_model'] . ' ';
    		break;
    	  case 'PRODUCT_LIST_NAME':
    		$lc_align = '';
    		if (isset($HTTP_GET_VARS['manufacturers_id'])) {
    		  $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a>';
    		} else {
    		  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] . '</a> ';
    		}
    		break;
    	  case 'PRODUCT_LIST_MANUFACTURER':
    		$lc_align = '';
    		$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';
    		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 = ' ' . $currencies->display_price($listing['products_price'], tep_get_tax_rate($listing['products_tax_class_id'])) . ' ';
    		}
    		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';
    		if (isset($HTTP_GET_VARS['manufacturers_id'])) {
    		  $lc_text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id'] . '&products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>';
    		} else {
    		  $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $listing['products_image'], $listing['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a> ';
    		}
    		break;
    	//bof product listing with attributes
    	 case 'PRODUCT_LIST_BUY_NOW':
    	   $lc_align = 'center';
    	  $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> ';
    	  break;
    	  // Begin Buy Now button with attributes and quantity mod 
    	  // Begin Add Multiple  with attributes Contrib
    	  case 'PRODUCT_LIST_MULTIPLE': 
    		$lc_align = 'right'; 
    		$lc_valign = 'top'; 
    		$lc_text = (TABLE_HEADING_MULTIPLE . tep_draw_input_field('Qty_ProdId_' . $listing['products_id'], '0', 'size="4"'));
    		$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $listing['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "'");
    		$product_info = tep_db_fetch_array($product_info_query);
    		$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");
    		$products_attributes = tep_db_fetch_array($products_attributes_query);
    		if ($products_attributes['total'] > 0) {
    		$lc_text .= '<table border="0" cellpadding="0" cellspacing"0">';
    		$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='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'");
    		while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
    		$selected = 0;
    		$products_options_array = array();
    		$lc_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n";
    		//$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 = '" . $listing['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");
    		$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['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 . "'" . " order by pa.options_values_price, pa.products_attributes_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($product_info['products_tax_class_id'])) .') ';
    	  }
    	}
    	//$lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]);
    	//$lc_text .= tep_draw_pull_down_menu('id_'.$listing[$x]['products_id'].'[' . $products_options_name_values['products_options_id'] . ']', $products_options_array);
    	$lc_text .= tep_draw_pull_down_menu('id_'.$listing['products_id'].'[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]);
    	//$lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]); 
    	$lc_text .= '</td></tr>';
      }
      $lc_text .= '</table>';
    }
    		break;			
    		case 'PRODUCT_LIST_BUY_NOW_MULTIPLE': 
    		 $lc_align = 'right'; 
    		$lc_valign = 'top'; 
    		$lc_text = '<form name="buy_now_' . $listing['products_id'] . '" method="post" action="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now_form', 'NONSSL') . '">';
    		$lc_text .= (TABLE_HEADING_MULTIPLE) . '<input type="text" name="cart_quantity" value="1" maxlength="6" size="4">'; 
    		$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . $listing['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "'"); 
    		$product_info = tep_db_fetch_array($product_info_query); 
    		$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); 
    		$products_attributes = tep_db_fetch_array($products_attributes_query); 
    		if ($products_attributes['total'] > 0) { 
    		$lc_text .= '<table border="0" cellpadding="0" cellspacing"0">'; 
    		$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='" . $listing['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . $languages_id . "'"); 
    		while ($products_options_name = tep_db_fetch_array($products_options_name_query)) { 
    		$selected = 0; 
    		$products_options_array = array(); 
    		$lc_text .= '<tr><td class="main">' . $products_options_name['products_options_name'] . ':</td><td>' . "\n"; 
    		$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 = '" . $listing['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $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($product_info['products_tax_class_id'])) .') '; 
    	  } 
    	} 
    	$lc_text .= tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]); 
    	//$lc_text .= tep_draw_pull_down_menu('id_'.$listing['products_id'].'[' . $products_options_name['products_options_id'] . ']', $products_options_array, $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']]);
    	$lc_text .= '</td></tr>'; 
      } 
      $lc_text .= '</table>'; 
      $lc_text .= tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW);
    
       }
      if ($products_attributes['total'] == 0) { 
    	$lc_text .= '<br> ';
    	$lc_text .= tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_buy_now.gif', TEXT_BUY . $listing['products_name'] . TEXT_NOW);
     $lc_text .= '<br> ';
     $lc_text .= '<table border="0" cellpadding="0" cellspacing"0"><tr><td class="main"></td><td></td></tr></table>';
    		 }
      $lc_text .= '</form>'; 
    		break; 
    // End Add Multiple mod
      }
      $product_contents[] = $lc_text;
    
    }
    $lc_text = implode('<br>', $product_contents);
    $list_box_contents[$row][$column] = array('align' => 'center',
    											//bof product listing with attributes
    											'valign' => $lc_valign,
    											//eof product listing with attributes
    										  'params' => 'class="productListing-data"',
    										  'text'  => $lc_text);
    $column ++;
    if ($x == ($no_of_listings -1)) {
     // fill up the remainder of the table row with empty cells, assumes three products per row!
     if ($column == '1') {
    $list_box_contents[$row][$column + 1] = array('align' => 'center',
    											//bof product listing with attributes
    											'valign' => $lc_valign,
    											//eof product listing with attributes
    										  'params' => 'class="productListing-data"',
    										  'text'  => " ");
    	   $column ++;
     }
     if ($column == '2') {
    $list_box_contents[$row][$column + 1] = array('align' => 'center',
    											//bof product listing with attributes
    											'valign' => $lc_valign,
    											//eof product listing with attributes
    										  'params' => 'class="productListing-data"',
    										  'text'  => " ");
    		$column++;
     }
       if ($column == '3') {
     $list_box_contents[$row][$column + 1] = array('align' => 'center',
    											//bof product listing with attributes
    											'valign' => $lc_valign,
    											//eof product listing with attributes
    										  'params' => 'class="productListing-data"',
    										  'text'  => " ");
     }	  
    }
    if ($column >= 4 || $x == ($no_of_listings -1) ) {
     $row ++; // we start a new tr here  with $list_box_contents
      $list_box_contents[$row] = array('params' => $class_for_buy_now);
      $column = 0;
    	 }
     } // end for ($x = 0; $x < $no_of_listings; $x++)
    
     new productListingBox($list_box_contents);
    } 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 ( ($listing_split->number_of_rows > 0) && ((PREV_NEXT_BAR_LOCATION == '2') || (PREV_NEXT_BAR_LOCATION == '3')) ) {
    ?>

     

    I'm sorry for posting so much code, but i didn't want to ask for help and ask people to find and download the contrib so they can look at the code. :blush:

     

    Again, i'm looking for where to add (or manipulate in) the 2 bits of code from the top into this new file to make the 2 contributions work together. Thank you SO SO much for any help you can give!

  13. I need this contribution, since i have worked the hard way to find a contribution like this.

     

    But the build has errors. I get this:::

    1054 - Unknown column 'entry_ein' in 'field list'
    
    insert into address_book (customers_id, entry_firstname, entry_lastname, entry_street_address, entry_postcode, entry_city, entry_country_id, entry_ein, entry_company) values ('33', 'sxdfsdfsd', 'sdfsdfsdf', 'aesfadafdd 6', '2344', 'dsadfasdfasdf', '57', 'dk12345678', 'adadasd')
    
    [TEP STOP]

     

    ... When I try to sign up.

     

    Any help would be nice :thumbsup:

     

    Thanks.

     

    If you're talking about the Tax_Id_Ein contribution (that's what the zip file is, don't remember what it's called in the actual contribution page), i'm still working on installing it, but one thing i did notice was the instructions in the catalog_admin_customers.php file were incomplete. It ends with

    FIND
    $sql_data_array = array('entry_firstname' => $customers_firstname,
    						 'entry_lastname' => $customers_lastname,
    						 'entry_street_address' => $entry_street_address,
    						 'entry_postcode' => $entry_postcode,
    						 'entry_city' => $entry_city,
    						 'entry_country_id' => $entry_country_id,

    and doesn't complete the instructions.

     

    I'm thinking what you want to do is find that code (mine was around line 170), and add the entry_ein so that the whole block of code looks something like this...

    $sql_data_array = array('entry_firstname' => $customers_firstname,
    							'entry_lastname' => $customers_lastname,
    							'entry_street_address' => $entry_street_address,
    							'entry_postcode' => $entry_postcode,
    							'entry_city' => $entry_city,
    							'entry_country_id' => $entry_country_id,
    							'entry_ein' => $entry_ein);

     

    I hope this helps. I'm going to probably finish this up tonight or tomorrow so i'll see if i run into that same error.

  14. Indeed, but did you upload catalog/includes/languages/english/modules/shipping/upsxml.php ? Pretty essential....

    Yes i did... the file is on the server, but there is nothing in the database about it. I did a search in the main database for module_shipping, and i got 17 results in the configuration database, but they were all dealing with either UPS or USPS. There was nothing about UPSXML or any of the other shipping modules that are on the server but not installed (like flat, item, or table). So am i searching in the wrong place? Should there be somewhere that lists the UPSXML, flat, item, and table modules even tho they're not installed?

  15. Yes, the one that says: MODULE_SHIPPING_UPSXML_TYPES.

    I don't have one of those =( They're all either MODULE_SHIPPING_UPS_... or MODULE_SHIPPING_USPS_... none are MODULE_SHIPPING_UPSXML_... and none have _TYPES at the end. It's only displaying ones for the modules i have installed (which are UPS and USPS)... i haven't even gotten as far as to install the UPSXML package in the admin area yet.

  16. Make sure (with phpMyAdmin) that you shorten the last field in the row with Shipping Methods, MODULE_SHIPPING_UPSXML_TYPES etc. to something that has , 'A UPS Method'), at the end. Then if that was the problem, uninstall and install.

    JanZ,

    I did a search in the database for everything that starts with MODULE_SHIPPING, and came up with i think 17 results... all either UPS or USPS related (since those are the 2 modules installed). Do i need to change something in one of those? The last field in the row is the set_function field.

     

    Thanks again for all your time and help =)

    Justin

  17. That looks fine.

    That is something the server admin can do, probably he/she won't be eager to change that. However, in the PHP ini file you can define a log file, so that PHP errors are at least logged. Ask them about that.

    i have access to the php ini file, do i just set log_errors = On, and say error_log = errors.log?

     

    Also take a look at the source code of the page in admin. It might give a clue on what point of the page/code the error occurs (which I think happens).

    In the source code, it shows the table being made for all the options, only with 3 columns - Modules, Sort Order, and Action; then the code abbruptly ends after the row for United Parcel Service ... after the closing </tr> tag there is nothing else.

     

    One more thing, in catalog/includes/modules/shipping/upsxml.php there is one line you need to change. Change define('DIMENSIONS_SUPPORTED', 1); to 0, like this:

    define('DIMENSIONS_SUPPORTED', 0);

    It doesn't affect the admin part though.

    I did set DIMENSIONS_SUPPORTED to 0 already... i think i remember reading that somewhere in the last 39 pages or so ;)

  18. What I miss in your description is that you did STEP 5 mentioned in the readme.txt. If you don't enlarge the database field for set_function you will get a parse error:

    1) Go to the configuration table in your database and change the type for
      field "set_function" from VARCHAR(255) to TEXT
    
    If you haven't done any of the above mentioned two things while installing, you will get an error message in the admin section:
     "Parse error: parse error, unexpected ';' in ....../admin/modules.php(235): eval()'d code on line 1"
    To rectify that, do any of the two options above, go to the admin section, shipping and "remove" upsxml, then "install" upsxml (again).

    If the server you are installing on is set to not echo error messages (a lot of servers do that, for good reason) you might just see part of the page till when the error occurs.

     

    This makes debugging so difficult. That is why it makes good sense to do your development work locally when you do can seen all the error and warning messages of PHP.

     

    I did Step 5 as well. I just went and checked the database - that field is set to text, but maybe some other values are wrong?? This is how it looks:

    Field: set_function

    Type: text

    Attributes:

    Null: Yes

    Default: NULL

     

    Do I need to change any of those values? Also, should i turn on error messages while i'm doing this, so i can see the errors and warning messages? Hehe, i'd rather see big bold red errors than pages that are half missing! How do i do this? I think i said before, i'm a real newbie at a lot of this stuff. Thanks so much for your help.

     

    ~Justin

  19. this is ridiculous! why on earth is this happening?? i just uploaded a fresh version of oscommerce, so no other contribs or anything has been done to it, tried installing this module and the EXACT same thing is happening!

     

    before i upload catalog/includes/modules/shipping/upsxml.php, everything looks right in the Admin->Modules->Shipping area (table with 4 columns, all current shipping options are there).

     

    as soon as i upload that file, the Admin->Modules->Shipping area gets all messed up (table with only 3 columns - the Install/Remove/Edit column is gone, and so are the USPS and Zone Rates shipping options, PLUS the UPS XML option isn't even there!)

     

    i can't believe i'm the only person that has this problem... again, it's a fresh install of oscommerce and this is the first contrib i'm trying to put in it.

     

    can anyone help, please?! i have a client who is (getting impatiently) waiting for me to install this for him.

  20. Justin,

    I don't get it: you miss some of the options? UPS XML is not there?

     

    When you have uploaded the two upsxml.php files (in different locations), you will see United Parcel Service (XML) as a shipping module when you go to Modules -> Shipping. Click on the "i" and you will get an Install/Remove Edit column. That is how it is supposed to work.

     

    If you did step 5 too late, you may still get that error but if your server is configured not to show you errors you might not see it.

     

    JanZ,

    Before i upload the 4 files in STEP 2, my Modules->Shipping is a 4-column table: Modules, Sort Order, Action, and the column with the [iNSTALL] button and details. The modules that are listed are Flat Rate, Per Item, Table Rate, United Parcel Service, United States Postal Service, and Zone Rates. I have UPS and USPS installed.

     

    After i upload the 4 files, my Modules->Shipping is a 3-column table: Modules, Sort Order, and Action (the column with the INSTALL button and details is gone). The only modules that are listed are Flat Rate, Per Item, Table Rate, and United Parcel Service (the same one as before). The USPS and Zone Rates modules are gone.

     

    It's crazy, i really don't know what's going on! Do you have any suggestions or ideas? Thank you so much!

    Justin

  21. Hi everyone,

     

    I'm trying to set this module up for a shopping cart, and i haven't noticed the problem i'm having listed here yet. If it has, please let me know and i'll keep searching through the 29 pages of discussions!

     

    The shopping cart i'm trying to add this to has a few contribs already installed (checkout without creating an account, print receipt, and shipping insurance), so perhaps that could be causing the problem.

     

    What happens is when i upload the files (just for the ups xml, not the dimensional support), and even when i've made the changes to the code in steps 3-4, and changed the configuration table as in step 5, when i go to my admin--modules--shipping, i'm missing some of the options, the ups xml one is definitely not up there, and the install/delete column is missing! :blink:

     

    Does anyone have any ideas about what is causing that? As soon as i remove the new files, everything is restored to normal.

     

    Thanks for anyone's advice or help they can give =D

     

    Justin

×
×
  • Create New...