Jump to content

Cocaberry

Members
  • Content count

    59
  • Joined

  • Last visited

Profile Information

  • Real Name
    Cocaberry
  1. Cocaberry

    All Products SEO

    Nevermind. I decided to uninstall the All Products SEO.
  2. Cocaberry

    All Products SEO

    I just installed this addon today and I'm having an error message on the product_listing.php page. When display mode is set to true, I get this error: Warning: Invalid argument supplied for foreach() in /home/cocaber1/public_html/includes/modules/product_listing.php on line 101 I'm not sure if it's this addon or the Extra Product Fields addon that is causing the problem but I didn't get this error until I installed the All Products SEO addon. Code for the /includes/modules/product_listing.php file: <?php /* $Id: product_listing.php 1739 2007-12-20 00:52:16Z hpdl $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ $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(); 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 = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = TABLE_HEADING_PRODUCTS; $lc_align = ''; break; case 'PRODUCT_LIST_MANUFACTURER': $lc_text = TABLE_HEADING_MANUFACTURER; $lc_align = ''; 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 = TABLE_HEADING_BUY_NOW; $lc_align = 'center'; break; } if ( ($column_list[$col] != 'PRODUCT_LIST_BUY_NOW') && ($column_list[$col] != 'PRODUCT_LIST_IMAGE') ) { $lc_text = tep_create_sort_heading($HTTP_GET_VARS['sort'], $col+1, $lc_text); } $list_box_contents[0][] = array('align' => $lc_align, 'params' => 'class="productListing-heading"', 'text' => ' ' . $lc_text . ' '); } 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)) { $rows++; if (($rows/2) == floor($rows/2)) { $list_box_contents[] = array('params' => 'class="productListing-even"'); } else { $list_box_contents[] = array('params' => 'class="productListing-odd"'); } $cur_row = sizeof($list_box_contents) - 1; 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': // begin extra product fields $extra = ''; foreach ($epf as $e) { if ($e['listing']) { $mt = ($e['uses_list'] ? ($listing[$e['field']] == 0) : !tep_not_null($listing[$e['field']])); if (!$mt) { // only list fields that aren't empty $extra .= '<br><b>' . $e['label'] . ': </b>'; if ($e['uses_list']) { $extra .= tep_get_extra_field_list_value($listing[$e['field']],$e['show_chain'] == 1); } else { $extra .= $listing[$e['field']]; } } } } // end extra product fields $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'] /*begin epf*/ . $extra /*end epf*/ . '</a>'; } else { $lc_text = ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing['products_id']) . '">' . $listing['products_name'] /*begin epf*/ . $extra /*end epf*/ . '</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'])) { // BOF: Additional Images $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'], (ADDIMAGES_RESTRICT_IMAGE_SIZE == 'true'?SMALL_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_IMAGE_SIZE == 'true'?SMALL_IMAGE_HEIGHT:'')) . '</a>'; // EOF: Additional Images } else { // BOF: Additional Images $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'], (ADDIMAGES_RESTRICT_IMAGE_SIZE == 'true'?SMALL_IMAGE_WIDTH:''), (ADDIMAGES_RESTRICT_IMAGE_SIZE == 'true'?SMALL_IMAGE_HEIGHT:'')) . '</a> '; // EOF: Additional Images } break; 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', 'products_id')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; } $list_box_contents[$cur_row][] = array('align' => $lc_align, 'params' => 'class="productListing-data"', 'text' => $lc_text); } } 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')) ) { ?> <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 } ?> Any help would be appreciated.
  3. Cocaberry

    Please HELP with Easy Specials !

    Yes, same thing with single product discounting.
  4. Cocaberry

    Please HELP with Easy Specials !

    Ok, for a 15% discount, typing in 15p works good but typing in 15% still gives the same error.
  5. Cocaberry

    Please HELP with Easy Specials !

    I don't think I'll be able to let you have access to my store but I do have an idea. Maybe the script can be modified so that there are 2 radio buttons or just a drop down box where the user can select either "currency" or "percent" for the type of discount. Then only the number can be typed in the input field. Obviously there is a problem with passing the percent sign itself through the script.
  6. Cocaberry

    Please HELP with Easy Specials !

    URL when this happens is: https://www.mystore.com/admin/specials.php?action=update_all&product_name=&cPath=&manufacturer_id=&sort=product_id&sort_type=asc&flag=&discount=50%25&date=&x=62&y=9 That is when I try to apply a 50% discount to all products in catalog (3 so far, just for testing). I typed in 50% in the "Discount (Currency or %):" field and clicked "Apply Discount." If I type in 50 without the percentage sign, the price of all items is set to $50.
  7. Cocaberry

    NEW! Complete Order Editing Tool!

    Hey, I'm having a problem with this contribution. When I add a product to an order, manual order editor does not change the product to inactive when last copy is bought. How can I fix this?
  8. Cocaberry

    Please HELP with Easy Specials !

    I am having the same problem. I am using easy advanced specials admin v1.3.2. Maybe someone has a fix for this?
  9. Cocaberry

    One Page Checkout Support

    Ok, I reported the bug to the email. I'm wondering though, does anyone else have this problem or just me? Here's how to reproduce the problem: Try to order any product. Enter all address info on checkout page. Select the "credit card (not for production use)" as the payment module. Type in any number for the credit card number besides the one provided by the module. Confirm order. When I do this, I get sent to the next page then get sent back to the checkout page with a message that says there is a problem with the credit card info. The problem is the order still gets inserted into the database.
  10. Cocaberry

    One Page Checkout Support

    Hey guys, I'm having another problem with this contribution. When the customer submits an order and there is some sort of problem with it (problem with payment info, etc), the user gets directed to the next pages that processes the order, but then the user gets sent back to the checkout page because of the error. The problem is the order is created in the database even though no email sent. By the time the order goes all the way through, there could be 2-3 or more identical orders in the database, but the user and I only get one email for the successful order.
  11. Cocaberry

    Manual Order Maker

    Hey, I'm having a few problems with this contribution: When I create a new order, the manual order editor does not change products to inactive when last copy is bought. It just changes the quantity to zero but if the product is not inactive, it still shows in the catalog. Also, there is no way to store payment info. If I choose the stock credit card module (just for testing), there is no place to input the credit card information. Oh and if I choose PayPal as the payment option, is there anyway for the customer to pay for the order through my site and still have the payment "linked" to the order? I would like it to be similar to when a customer does the regular checkout through PayPal. I am using the latest PayPal IPN module, not the stock PayPal Standard module.
  12. Cocaberry

    One Page Checkout Support

    Ok, I've solved the payment loading problem. I loaded this IPN module instead: http://addons.oscommerce.com/info/2679 I haven't gotten the payment to go through on the test site, but the live site looks just fine.. I didn't actually send payment through the live site though. I might need to mess with my Sandbox settings some. But all that probably belongs in a different thread. Start with "PayPal IPN Module 2.3.4.7" and then load some of the bug fixes if you want. I skipped the contribs by aplein.
  13. Cocaberry

    One Page Checkout Support

    Thanks, but neither of those options works good for me. Both still show up in a form and I think that will confuse the customers. I've decided to just leave the quantity fields the way they are and use the "only this many available" contrib, so if someone tries to order more than one of each, they'll be told I only have one of each available. Regarding this.. I tried this: http://forums.oscommerce.com/topic/333292-one-page-checkout-support/page__view__findpost__p__1503075 And it fixes the page getting stuck on "refreshing payment methods" but when I select another payment option other than PayPal, for example the credit card option, the form does not pop up under the option to fill in the extra info i.e. credit card name, number, expiration date, etc...
  14. Cocaberry

    One Page Checkout Support

    Also one more question.. is there anyway to still show the quantity in the checkout but not let the customer edit it? I only sell single items and only have one of each so I can't let the customer try to order more than I have. I found the line in includes/checkout/cart.php <td class="main" valign="top"><?php echo tep_draw_input_field('qty[' . $order->products[$i]['id'] . ']', $order->products[$i]['qty'], 'size="3" onkeyup="$(\'input[name^=qty]\').attr(\'readonly\', true); $(\'#updateCartButton\').trigger(\'click\')"'); ?></td> Now I just need to figure out how to change it so it still displays but cannot be edited and the quantity values still gets passed through the checkout process form.
  15. Cocaberry

    One Page Checkout Support

    Thanks, I managed to rearrange the forms. I just discovered I have another problem though. When I try to use the PayPal Web Standard Payments module as the only payment module the One Page Checkout page get stuck on "refreshing payment methods." The page also gets stuck when I use the PayPal module along with other modules. It gets stuck when I select PayPal as the payment option. I am using the version of the file that was included in the latest OPC download. What could the problem be?
×