Latest News: (loading..)

orchard

Members
  • Content count

    636
  • Joined

  • Last visited

1 Follower

About orchard

Profile Information

  1. If there's a contribution to add a fixed amount, it seems like it shouldn't be too hard to hack it to add a percentage instead.
  2. I think this is legal in the US although maybe you have to call it a discount for cash instead of a surcharge for credit. The gas stations here do it all the time.
  3. I searched with AgentRansack and there are several references to tep_get_order_status_name. The one in includes/modules/payment/paypal.php is inside of a tep_db_query which I assume is why it is called a callback.
  4. You should get something like AgentRansack to search for files and for text within files. Then you won't have to know what directory the files are in or what files the text is in.
  5. I think you comment out line 55 <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_PURCHASED; ?> </td> and line 76 <td class="dataTableContent" align="right"><?php echo $currencies->format($customers['ordersum']); ?> </td> There may be some colspan=3 that you need to edit too since now the table will only have 2 columns.
  6. If I understand correctly, events_listings.php knows the product_id because it's $products['product_id'] and is being passed in the URL as the pID value. I think this means that xxx can be replaced by $HTTP_GET_VARS['pID']. I'm not sure whether "and op.product_id = xxx" is the correct syntax or ", op.product_id = xxx" is.
  7. Yes, I think line 59 is where I got that line. I was thinking the xxx would be a variable you had to tell which product you are making the report about. Maybe it would come from the arguments in the URL.
  8. If I understand what you are trying to do correctly, you need to play around with the where section of this query to limit it to the product_id you want. $customers_query_raw = "select c.customers_firstname, c.customers_lastname, sum(op.products_quantity * op.final_price) as ordersum from " . TABLE_CUSTOMERS . " c, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS . " o where c.customers_id = o.customers_id and o.orders_id = op.orders_id group by c.customers_firstname, c.customers_lastname order by ordersum DESC"; Maybe you need to add op.product_id = xxx to the where section.
  9. Can you post a few lines before line 225?
  10. I'm glad you got it working. :) The normal way to open a new window would be to find the <a href= for the category and add target="_blank" into the href, but it wasn't obvious to me where to do this in the osCommerce code. There's nice searchable documentation for PHP at www.php.net, but I'm not sure what to search for there.
  11. You can get what I think you want fairly easily. Create a new category named Our CafePress Store and find out it's cPath value (click it and look in the URL). Then insert lines near the top of default.php as shown here if (isset($cPath) && tep_not_null($cPath)) { // start of hack if ( $cPath == 32 ) // replace 32 with your cPath number { header( 'Location: http://www.oakvalley.com' ); // replace oakvalley.com with your URL exit; } // end of hack $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . $current_category_id . "'"); I just tried it on my store and it worked fine.
  12. Sorry, I misunderstood. This is the line of code that displays the product description. </table><p><?php echo stripslashes($product_info['products_description']); ?></p> If you are not able to embed PHP into the product descriptions, you could embed a special character that you can search for. Then you could split $product_info['products_description'] into several strings based on the search and rewrite the line to show one string, then some PHP, then the next string, etc.
  13. You can embed HTML in the product descriptions.
  14. I put code to only show one product with a similar name here. You should be able to modify it to display the cheapest one instead of the newest one.
  15. I don't know about that specific contribution, but it seems odd to have to edit every file. Duplicated code seems like an HTML thing. To me part of the beauty of PHP is that if the includes are used properly you only have to make your change in one place and it shows up on all the pages.