Jump to content

ecartz

♥Ambassador
  • Content count

    3,760
  • Joined

  • Last visited

  • Days Won

    64

Reputation Activity

  1. Like
    ecartz got a reaction from cdetdi in When is /ext/.../standard_ipn used?   
    Just to highlight something that others have noted in passing but may not have stated explicitly enough.  If you want to test the IPN path, then don't go back to your site after making the payment.  Because if you just click quickly through everything, chances are that you get back to the site before PayPal sends the IPN.  So act like a customer.  When you get to the screen that says something like "Click here to return to the merchant", close the browser window.  Then your test will work like their order.  Because some customers do exactly that. 
    Note that both the IPN and the click through flow use the paypal_standard file.  The IPN file also has some logic of its own.  This contrasts to the logic triggered from the checkout_process file. 
  2. Like
    ecartz got a reaction from cdetdi in When is /ext/.../standard_ipn used?   
    Just to highlight something that others have noted in passing but may not have stated explicitly enough.  If you want to test the IPN path, then don't go back to your site after making the payment.  Because if you just click quickly through everything, chances are that you get back to the site before PayPal sends the IPN.  So act like a customer.  When you get to the screen that says something like "Click here to return to the merchant", close the browser window.  Then your test will work like their order.  Because some customers do exactly that. 
    Note that both the IPN and the click through flow use the paypal_standard file.  The IPN file also has some logic of its own.  This contrasts to the logic triggered from the checkout_process file. 
  3. Like
    ecartz got a reaction from sickaporean in 1064 error and worse ...   
    The one and only important difference is in includes/modules/product_listing.php , so you can just copy that file from the download (either the second link that I posted or it's on the downloads page now).  Or use the first link and delete the single line that it shows to delete. 
    The only other file that has changed is the includes/version.php file.  If you want, you can copy that over too. 
    I don't know that update instructions have been posted yet, but they would essentially be to copy those two files. 
  4. Like
    ecartz got a reaction from sickaporean in 1064 error and worse ...   
    Unfortunately, 1.0.7.0 is the version on the download page. 
    The line to remove to fix that is at https://github.com/gburton/CE-Phoenix/commit/82d528731f600565d113614e0733a831c5a27f8a
    Alternately, download the entire https://github.com/gburton/CE-Phoenix/archive/master.zip and extract includes/modules/product_listing.php and copy it over. 
  5. Like
    ecartz got a reaction from sickaporean in 1064 error and worse ...   
    If you use phpMyAdmin to run
    select p.*, pd.*, m.*, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price, p.products_quantity as in_stock, if(s.status, 1, 0) as is_special from products_description pd, products p left join manufacturers m on p.manufacturers_id = m.manufacturers_id left join specials s on p.products_id = s.products_id, products_to_categories p2c 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 = '2' order by pd.products_name what does it say? 
  6. Thanks
    ecartz got a reaction from ce7 in admin Define Languages produces double blank lines   
    I would do it right before the return rather than where you're doing it, for efficiency's sake and to make sure you sort every file. 
    I think that you are implicitly sorting by path most of the time but not always.  Try
    usort($result, function ($a, $b) { return strcmp($a['name'], $b['name']); }); return $result; That explicitly sorts by path. 
    Or even better might be to move it outside the function entirely. 
    foreach (tep_opendir(DIR_FS_CATALOG_LANGUAGES . $_GET['lngdir']) as $file) { to
    $files = tep_opendir(DIR_FS_CATALOG_LANGUAGES . $_GET['lngdir']); usort($result, function ($a, $b) { return strcmp($a['name'], $b['name']); }); foreach ($files as $file) {  
  7. Thanks
    ecartz got a reaction from Philo2005 in Product Listing - Picture width   
    https://github.com/gburton/CE-Phoenix/commit/8f4c98ab496f47b58bcc8accf81b183fab013013
    Or just update to 1.0.6.0. 
  8. Like
    ecartz got a reaction from ce7 in Products Image Verify   
    Try replacing every instance of
    $HTTP_GET_VARS with
    $_GET I.e.
    <?php require 'includes/application_top.php'; if (!function_exists('file_put_contents')) { function file_put_contents($filename, $data, $file_append = false) { $fp = fopen($filename, ($file_append ? 'a+' : 'w+')); if (!$fp) { trigger_error('file_put_contents cannot write in file.', E_USER_ERROR); return; } fputs($fp, $data); fclose($fp); } } require 'includes/template_top.php'; ?> <!-- body_text //--> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo HEADING_TITLE; ?></td> <td class="pageHeading" align="right"><?php echo tep_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?></td> <td class="dataTableHeadingContent" align="left"><?php echo TABLE_HEADING_IMAGE_SIZE; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td> </tr> <?php if ($sID !="" && file_exists(DIR_FS_CACHE . 'image_verify.cache')) { $fd = fopen (DIR_FS_CACHE . 'image_verify.cache', "r"); $iv_cache_contents = fread ($fd,filesize (DIR_FS_CACHE . 'image_verify.cache')); fclose ($fd); $verify_query_raw = "select p.products_id, p.products_image, pd.products_name from products p, products_description pd where p.products_id = pd.products_id and (" . $iv_cache_contents .") order by pd.products_name"; } else { if (file_exists(DIR_FS_CACHE . 'image_verify.cache')) { unlink(DIR_FS_CACHE . 'image_verify.cache'); } $verify_query_raw = "select p.products_id, p.products_image, pd.products_name from products p, products_description pd where p.products_id = pd.products_id order by pd.products_name"; } $verify_query = tep_db_query($verify_query_raw); while ($verify = tep_db_fetch_array($verify_query)) { if ( !isset($sInfo) && (!isset($_GET['sID']) || ($_GET['sID'] == $verify['products_id'])) ) { $sInfo = new objectInfo($verify); } //Checks Status of all 3 image sizes to make sure it is not blank, null or if file exists so we only print out products with missing images only. $image_status = 0; if ($verify['products_image'] != "" && $verify['products_image'] != "NULL") { if (file_exists(DIR_FS_CATALOG . 'images/' . $verify['products_image'])) { $image_status = 1; } else { $image_status = 0; } } else { $image_status = 2; } if ($image_status != 1) { if (file_exists(DIR_FS_CACHE . 'image_verify.cache')) { file_put_contents(DIR_FS_CACHE . 'image_verify.cache', " or pd.products_id = " . $verify['products_id'], 'append.php'); } else { file_put_contents(DIR_FS_CACHE . 'image_verify.cache', "pd.products_id = " . $verify['products_id']); } } if ( (is_object($sInfo ?? null)) && ($verify['products_id'] == $sInfo->products_id) && ($image_status != 1)) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link('image_verify.php', '&sID=' . $sInfo->products_id) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link('image_verify.php', '&sID=' . $verify['products_id']) . '\'">' . "\n"; } if ($image_status != 1) { ?> <td class="dataTableContent"><?php echo $verify['products_name']; ?></td> <td class="dataTableContent" align="left"><?php } switch ($image_status) { case 0: echo tep_image('images/icons/ms_error.png', KEY_OK, 20, 20); break; case 2: echo tep_image('images/icons/ms_warning.png', KEY_ERROR, 20, 20); break; } if ($image_status != 1) { ?></td> <td class="dataTableContent" align="right"> <?php if ( (is_object($sInfo)) && ($verify['products_id'] == $sInfo->products_id) ) { echo tep_image('images/icon_arrow_right.gif', ''); } else { echo '<a href="' . tep_href_link('image_verify.php', 'page=' . $_GET['page'] . '&sID=' . $verify['products_id']) . '">' . tep_image('images/icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?>&nbsp;</td> </tr> <?php } } ?> </table></td> <?php $heading = []; $contents = []; if ($sID =="") { $heading[] = ['text' => '<b><center>PLEASE CLICK ON PRODUCT ROW<BR>FOR MORE OPTIONS</center></b>']; } else { $heading[] = ['text' => '<b><center>' . $sInfo->products_name. '</center></b>']; } $contents[] = ['text' => '' . tep_image('images/pixel_black.gif', '', '100%', 3)]; $contents[] = [ 'align' => 'center', 'text' => '<a href="' . tep_href_link('categories.php', '&pID=' . $sInfo->products_id . '&action=new_product') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . tep_href_link('categories.php', '&pID=' . $sInfo->products_id . '&action=delete_product') . '">' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '</a>', ]; $contents[] = ['text' => '' . tep_image('images/pixel_black.gif', '', '100%', 3)]; $contents[] = ['text' => '' . tep_image('images/icons/ms_error.png', '', 20, 20) . KEY_ERROR]; $contents[] = ['text' => '' . tep_image('images/icons/ms_warning.png', '', 20, 20) . KEY_NOT_USED]; $contents[] = ['text' => '' . tep_image('images/pixel_black.gif', '', '100%', 3)]; $contents[] = ['text' => DELETE_WARNING]; $contents[] = ['text' => '' . tep_image('images/pixel_black.gif', '', '100%', 3)]; $contents[] = ['text' => EDIT_WARNING]; $contents[] = ['text' => '' . tep_image('images/pixel_black.gif', '', '100%', 3)]; if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box(); echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?> </tr> </table></td> </tr> </table></td> <!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> </body> </html> <?php require 'includes/template_bottom.php'; ?> <?php require 'includes/application_bottom.php'; ?> Also changed the location of the cache file.  The previous version required the admin directory to be writable, which should not be necessary. 
  9. Like
    ecartz got a reaction from raiwa in Purchase without account for 2.3.4 and BS2334   
    Nothing to do with this App (PWA), but this suggests that the class name and file of manualCart do not match or are not in includes/classes or includes/modules.  I would expect a class name of ManualCart and a file name of manual_cart.php -- it's possible that just changing those to match expectations would work.  You might want to post in that App's support thread for more help. 
  10. Like
    ecartz got a reaction from GetSirius in Categories Navbar Module - Phoenix v1.0.6.0   
    You might want to change lines 67-71 to
    $tpl_data = ['group' => $this->group, 'file' => __FILE__]; include 'includes/modules/block_template.php'; Which happens to be robust in the face of name changes as well as forwardly compatible with switchable templates.  See https://github.com/gburton/CE-Phoenix/commit/e8280d9fdf6364c01484fb5f292adf2511bcefbb#diff-da2a69f7f229fdc1ad483c93b286d7f2 for examples. 
  11. Like
    ecartz got a reaction from Omar_one in Free Shipping Per Product for v2.3   
    Create a checkout_shipping, injectRedirects hook. 
    public function listen_injectRedirects() { $GLOBALS['products_ship_free'] = false; if (!GLOBALS['free_shipping']) { define('TEXT_CHOOSE_SHIPPING_METHOD', TEXT_CHOOSE_SHIPPING_METHOD_NO_PFS); define('TEXT_ENTER_SHIPPING_INFORMATION', TEXT_ENTER_SHIPPING_INFORMATION_NO_PFS); return; } foreach ($_SESSION['cart']->get_products() as $product) { if (1 == $product['ship_free']) { $ship_free_count += $product['quantity']; } } if (($GLOBALS['total_weight'] == 0) && ($GLOBALS['total_count'] == 0)) { $products_ship_free = true; $GLOBALS['free_shipping'] = true; if (!defined('FREE_SHIPPING_TITLE')) { include 'includes/languages/' . $_SESSION['language'] . '/modules/order_total/ot_shipping.php'; } } define('TEXT_CHOOSE_SHIPPING_METHOD', ($products_ship_free ? sprintf(PRODUCTS_SHIP_FREE_COUNT, $ship_free_count); : TEXT_CHOOSE_SHIPPING_METHOD_NO_PFS)); define('TEXT_ENTER_SHIPPING_INFORMATION', ((!$products_ship_free && ($ship_free_count > 0)) ? sprintf(PRODUCTS_SHIP_FREE_COUNT_ONLY, $ship_free_count) : TEXT_ENTER_SHIPPING_INFORMATION_NO_PFS)); } or similar.  In the language files for that page, for each language, change TEXT_CHOOSE_SHIPPING_METHOD to TEXT_CHOOSE_SHIPPING_METHOD_NO_PFS and TEXT_ENTER_SHIPPING_INFORMATION to TEXT_ENTER_SHIPPING_INFORMATION_NO_PFS. 
    In your overridden shopping_cart class, also change
    function count_contents() { $total_items = 0; if (is_array($this->contents)) { foreach (array_keys($this->contents) as $products_id) { $total_items += $this->get_quantity($products_id); } } return $total_items; } to
    function count_contents() { $total_items = 0; if (is_array($this->contents)) { foreach ($this->contents as $products_id => $product) { if (1 != $product['ship_free']) { $total_items += $this->get_quantity($products_id); } } } return $total_items; } and change in the calculate function
    $this->weight += ($qty * $products_weight); to
    if (1 != $this->contents[$products_id]['ship_free']) { $this->weight += ($qty * $products_weight); } That should cover the checkout_shipping instructions Lambros posted.  There may be other changes necessary to other files that are not included here.  For example, there are other changes to the shopping_cart class posted in the instructions.  And the catalog/shopping_cart.php change would now be made in includes/modules/content/shopping_cart/templates/tpl_cm_sc_product_listing.php
    Replace
    echo '<th><a href="' . tep_href_link('product_info.php', 'products_id=' . $product['id']) . '">' . $product['name'] . '</a>'; foreach (($product['attributes'] ?? []) as $option => $value) { with
    echo '<th><a href="' . tep_href_link('product_info.php', 'products_id=' . $product['id']) . '">' . $product['name'] . '</a>'; if (1 == $product['ship_free']) { echo '<br /><span class="smallText">(' . TEXT_PRODUCT_SHIPS_FREE . ')</span>'; } foreach (($product['attributes'] ?? []) as $option => $value) { That's three lines added between two existing lines. 
    Hopefully that will be enough to get you going.  @Omar_one
  12. Like
    ecartz got a reaction from GetSirius in Categories Navbar Module - Phoenix v1.0.6.0   
    Also, this usually means that there is an error.  This error might be logged somewhere.  And knowing what the error was would be helpful. 
    You'd have to put the files in navbar not navbar_modules. 
  13. Thanks
    ecartz got a reaction from Demitry in problem with .mx files generated as copies of all .php files   
    You could reduce (but not eliminate) the danger by removing the r from rm -rf
    find change_to_your_own_directory/ -type f -name '*.mx' -exec rm -f {} \; The r stands for recursive and is what allows rm to delete directories.  Without it, rm will only delete files. Better might be to do something like
    find change_to_your_own_directory/ -type f -name '*.mx' -print find change_to_your_own_directory/ -type f -name '*.mx' -delete Where you check the files printed by the first line before running the second line. 
    Two possibilities that come to mind: 
    1.  This is caused by some IDE.  E.g. Dreamweaver MX.
    2.  This is a hack attempt of some sort. 
    Similar problem reported at https://stackoverflow.com/questions/61875526/mx-files-found-in-wordpress-core-files-with-the-same-core-code -- perhaps that will get a relevant answer. 
  14. Thanks
    ecartz got a reaction from zefeena in Displaying orders (list)   
    In Phoenix, this would be based on MAX_DISPLAY_SEARCH_RESULTS which affects catalog and admin.  That's under admin > Configuration > Maximum Values
    To change to not use MAX_DISPLAY_SEARCH_RESULTS, you would edit admin/orders.php
    $orders_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $orders_query_raw, $orders_query_numrows); I don't know if your version is the same or not.  But it might be worth checking. 
  15. Like
    ecartz got a reaction from plutomon in Lost with version to use   
    You should not use Frozen if you are starting today. 
    Version 2.3.4.1 will not work with newer versions of PHP.  So if you use it, you should make sure that you stay on PHP 5 and not 7.  Your host may not like to continue running PHP 5. 
    Phoenix is current, responsive, and under active development.  It is the successor to Frozen.  I would recommend this over 2.3.4.1. 
  16. Like
    ecartz got a reaction from plutomon in Lost with version to use   
    No.  It's often better to start a new site for that migration.  So your 2.3.3.4 stays on 5.3 while you work on Phoenix on 7.  Some hosts can do that in subdirectories but most will prefer separate domains.  You might be able to use a subdomain like shop.mysite.com rather than www.mysite.com
  17. Like
    ecartz got a reaction from Patty in Q. tep_   
    The Exchange Project
    That was the name before osCommerce in versions 1.0, 2.0, and 2.1.  A shop being a place where you can exchange money for goods.  I would find Open Source Commerce to be a more useful name without a conflict with a commonly used Microsoft product for managing emails and group interactions.  OSCOM stands for Open Source Commerce Online Merchant.  CE stands for Community Edition.  BS stands for BootStrap.  In general, the current CE Phoenix is a successor to the previous BS versions. 
  18. Like
    ecartz got a reaction from hungryfrank in Error with manufacturers.php   
    It says that the cache was corrupted and not reloading.  There may have been a PHP update on your host that changed how count handled things in that case.  I have a sort of vague recall that something used to be a zero that may now be a one.  But since that code doesn't set the cache block, there's no way to fix it there. 
    You might be able to fix it in whatever the $cache thing is, but I don't believe that's standard.  I think that's an App you added.  Because I recall the core caching as working differently.  Of course, that's old enough that perhaps my recall is wrong. 
    You commented out the code that checks if the cache is working and falls back to a database query.  So it just always does the database query.  Because the cache was returning that it was working even though it didn't seem to be. 
  19. Like
    ecartz got a reaction from raiwa in admin Define Languages produces double blank lines   
    When I try editing the corrupted version of the file, I get either CRLFCRLF or LFLF depending on whether I do the replace before saving.  A better replacement might be
    $file_contents = preg_replace("{\r+\n}", "\n", stripslashes($_POST['file_contents'])); But I can't really test it, as I believe that the CRCRLF is getting converted to CRLFCRLF prior to that point. 
    I'll let @burt make the decision about whether it is better to push to core or not.  And which version and when. 
  20. Like
    ecartz got a reaction from ce7 in if special price is 0 show Quote button   
    $add_to_cart = false; if (is_email_for_quote($product_info['products_price'])) { $products_price = show_email_for_quote($product_info); } elseif (($new_price = tep_get_products_special_price($product_info['products_id'])) && is_email_for_quote($product_info['specials_new_products_price'])) { $specials_price =show_email_for_quote($product_info['specials_new_products_price']); } else { $add_to_cart = tep_draw_button(MODULE_CONTENT_PI_BUY_BUTTON_TEXT, 'fas fa-shopping-cart', null, 'primary', array('params' => 'data-has-attributes="' . (($products_attributes['total'] > 0) ? '1' : '0') . '" data-in-stock="' . (int)$product_info['products_quantity'] . '" data-product-id="' . (int)$product_info['products_id'] . '"'), 'btn-success btn-block btn-lg btn-product-info btn-buy') . tep_draw_hidden_field('products_id', (int)$product_info['products_id']); } And then later, replace the add to cart code with
    if ($add_to_cart) { echo $add_to_cart; }  
  21. Like
    ecartz got a reaction from ce7 in product Info page <del>old price </del>   
    It's hidden in the language file:  https://github.com/gburton/CE-Phoenix/blob/master/includes/languages/english/modules/content/product_info/cm_pi_price.php
    Note that that seems likely to change, as overridable templates require HTML to be in the templates rather than the language files.  But it is currently in the language file. 
  22. Thanks
    ecartz got a reaction from rupruprup in German Special Chars (Umlaute) in search Result   
    I looked into this more.  The problem it creates is that it adds a dependency on the mbstring extension which is not always installed.  There also might be encoding problems if the default encoding is different from the encoding of the string.  Perhaps
    if ( (defined('MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS')) && (MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS != 'Meta') ) { $where_str .= "pd.products_seo_keywords LIKE '%" . tep_db_input($keyword) . "%' OR "; } $where_str .= "pd.products_name LIKE '%" . tep_db_input($keyword) . "%' OR p.products_model LIKE '%" . tep_db_input($keyword) . "%' OR m.manufacturers_name LIKE '%" . tep_db_input($keyword) . "%'"; if (isset($_GET['search_in_description']) && ($_GET['search_in_description'] == '1')) $where_str .= " OR pd.products_description LIKE '%" . tep_db_input($keyword) . "%'"; to
    if ( (defined('MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS')) && (MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS != 'Meta') ) { $where_str .= "pd.products_seo_keywords LIKE LOWER('%" . tep_db_input($keyword) . "%') OR "; } $where_str .= "pd.products_name LIKE LOWER('%" . tep_db_input($keyword) . "%') OR p.products_model LIKE LOWER('%" . tep_db_input($keyword) . "%') OR m.manufacturers_name LIKE LOWER('%" . tep_db_input($keyword) . "%')"; if (isset($_GET['search_in_description']) && ($_GET['search_in_description'] == '1')) $where_str .= " OR pd.products_description LIKE LOWER('%" . tep_db_input($keyword) . "%')"; in advanced_search_result.php and remove the strtolower from tep_parse_search_string. 
    $search_str = trim($search_str);  
  23. Thanks
    ecartz got a reaction from rupruprup in German Special Chars (Umlaute) in search Result   
    Maybe try changing
    $search_str = trim(strtolower($search_str)); to
    $search_str = trim(mb_strtolower($search_str)); If that fixes it, we could consider adding that to core.  But I first want to know if it fixes the problem without creating other problems. 
    If it doesn't go to core, an alternative would be to set the locale properly.  From https://www.php.net/manual/en/function.strtolower.php
     
  24. Thanks
    ecartz got a reaction from Patty in [Contribution] Ship In Cart   
    It looks like it needs to have the $customer object created. 
    $customer = new customer($customer_id); You may have to find a way to make it work with a fake customer ID when the customer is not logged in.  Possibly would require shipto and billto to be stored in the session (as arrays of information). 
  25. Thanks
    ecartz got a reaction from hungryfrank in how to bypass create_account_success.php   
    Or just duplicate the create_account page.  The new, not core, file could have completely arbitrary logic. 
×