Jump to content

MattM

Members
  • Content count

    16
  • Joined

  • Last visited

Posts posted by MattM


  1. There is an error in EasyPopulate. It might be fixed in the latest versions, but it's in my copy.

     

    In the file easypopulate.php, around line 500, you will find:

     

      if ($dltype == 'froogle'){
    	 // For froogle, we check the specials prices for any applicable specials, and use that price
    	 // by grabbing the specials id descending, we always get the most recently added special price
    	 // I'm checking status because I think you can turn off specials
    	 $sql2 = "SELECT
      	 specials_new_products_price
       FROM
      	 ".TABLE_SPECIALS."
       WHERE
       products_id = " . $row['v_products_id'] . " and
       status = 1 and
       expires_date < CURRENT_TIMESTAMP
       ORDER BY
      	 specials_id DESC"
    	 ;

     

    The problem is expires_date < CURRENT_TIMESTAMP, it should be expires_date > CURRENT_TIMESTAMP.


  2. I'd like to add a "sort order" field to EP that is part of the attribute table. This is to support this mod: http://www.oscommerce.com/community/contributions,1690

     

    I looked through the code, but it looks a lot more complicated than adding fields to the products table. The part that deals with this seems to be around line 2000 and it looks like the options_values_price and price_prefix are the only things pulled from this table and they are concatenated together before being added to a local array.

     

    This leaves no easy place to store the sort order value.

     

    I'm hesitant to start from scratch creating a structure to hold this, since I don't fully follow everything being done in the easypopulate.php code.

     

    Any ideas???


  3. Peter -

     

    I have the savings amount, but not the percentage on my site. You should be able to combine the code below from product_info.php with the percentage code you have to get what you want.

     

    Relevant code sections:

    ? ? if ($new_price = tep_get_products_special_price($product_info['products_id'])) {

    ? ? ? $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';

    ? ? ? $savings = $product_info['products_list_price'] - $new_price;? ?

    ? ? } else {

    ? ? ? $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));

    ? ? ? $savings = $product_info['products_list_price'] - $product_info['products_price'];

    ? ? }

    ? ? ? ? ? ? <td class="pageHeading" align="right" valign="top">

    ? ? ? ? ? ? ? <table border="0" width="100%" cellspacing="0" cellpadding="0">

    ? ? ? ? ? ? ? ? <tr>

    ? ? ? ? ? ? ? ? ? <td class="pageHeading" align="right" valign="top">list price: <s><?php echo $currencies->display_price($product_info['products_list_price'], tep_get_tax_rate($product_info['products_tax_class_id'])); ?></s></td>

    ? ? ? ? ? ? ? ? </tr>

    ? ? ? ? ? ? ? ? <tr>

    ? ? ? ? ? ? ? ? ? <td class="pageHeadingPrice" align="right" valign="top">price: <?php echo $products_price; ?></td>

    ? ? ? ? ? ? ? ? </tr>

    ? ? ? ? ? ? ? ? <tr>

    ? ? ? ? ? ? ? ? ? <td class="pageHeadingSavings" align="right" valign="top">you save: <?php echo $currencies->display_price($savings, tep_get_tax_rate($product_info['products_tax_class_id'])); ?></td>

    ? ? ? ? ? ? ? ? </tr>

    ? ? ? ? ? ? ? </table>

    ? ? ? ? ? ? </td>

     

    P.S. I named the new database field "products_list_price". The original contribution was "products_retail_price."


  4. Actually it's a Cobalt RAQ running Sun's version of Linux.

     

    Uncommenting extension=curl.so in php.ini took care of the curl error.

     

    Setting allow_call_time_pass_reference to true fixed the warnings. Of course, there is a long comment in the .ini file how this is a really bad idea that won't be supported in the future and you should really change the way the function is defined.

     

    Anyway, it works now that's all that's important.

     

    Thanks!


  5. Hello all!

     

    I just installed the latest version (6 Dec, 2nd upload) and it all works right up until I hit the link or track button. In the popup I get:

     

    Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/sites/site5/web/includes/classes/xmldocument.php on line 254

     

    Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of [runtime function name](). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/sites/site5/web/includes/classes/xmldocument.php on line 273

     

    Warning: Call-time pass-by-reference has been deprecated - argument passed by value; If you would like to pass it by reference, modify the declaration of xml_set_object(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file. However, future versions may not support this any longer. in /home/sites/site5/web/includes/classes/xmldocument.php on line 282

     

    If I go to the tracking page from the information box, the same three errors show up below the textbox for the tracking number as soon as the page comes up - don't even have to hit the track button.

     

    If I comment out the error_reporting(0); line, then I also get this when I hit the track button:

    Fatal error: Call to undefined function: curl_init() in /home/sites/site5/web/includes/classes/tracking.php on line 32

     

    I'm running 2.2 MS2 under php 4.1.2-3. I confirmed that cURL is installed and it works on the shell command line.

     

    Ideas?

×