Jump to content

ecartz

♥Ambassador
  • Content count

    2,138
  • Joined

  • Last visited

  • Days Won

    5

Reputation Activity

  1. Like
    ecartz got a reaction from cables24h in How do I reset a forgotten admin password?   
    Are you using the htpasswd?  You might need to move the .htaccess and .htpasswd_oscommerce files out of the admin directory (move them rather than deleting them in case you need to move them back). 
  2. Thanks
    ecartz got a reaction from Philo2005 in SEO html: <meta> tags in <body> instead <head>   
    Well, it's language specific, so I'd check the part of the language files that specifies that
    <htmldir="ltr" lang="de"> My guess is that you're missing a space in
    define('HTML_PARAMS', ' dir="ltr" lang="de"'); in the german.php file.  Note that there should be a space before the dir entry. 
    Your browser doesn't know what an htmldir tag is, so it assumes that it's part of the body.  So your browser implicitly creates the html, head, and body tags.  Then it removes the ones that template_top.php created. 
  3. Like
    ecartz got a reaction from peterpil19 in Change from viariable to fixed pathnames   
    I believe that it's
    if (!file_exists(DIR_FS_CATALOG . 'includes/modules/payment/'. $payment . '.php')) and
    require_once(DIR_FS_CATALOG . 'includes/modules/payment/'. $payment . '.php'); Here's the commit.  It says that the following were removed
    define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); So anything with DIR_WS_MODULES should be replaced with 'includes/modules/' and then you can concatenate neighboring strings. 
    DIR_FS_CATALOG and $payment should stay the same.  If you continue to have trouble, try replacing $payment with $GLOBALS['payment'] and output both (either to log or screen; preferably log if a live site). 
  4. Thanks
    ecartz got a reaction from bonbec in CE-Phoenix v1.0.3.0   
    Right.  But the thing that he didn't know was that you had a use case that required an additional hook (as I don't see where else to add this particular change, as it only makes sense just before displaying the new/edit product page, not in the existing hooks).  And of course this involves a core change to make that section modifiable, at least how I wrote it. 
    If we get in the habit of making this kind of changes with hooks, then we are more likely to get the hook into core than we would be to get the specific change into core.  And then our site customizations will persist between versions. 
  5. Like
    ecartz got a reaction from LeeFoster in CE-Phoenix v1.0.3.0   
    Wouldn't it be better to change
    <h1 class="pageHeading"><?php echo (isset($_GET['pID'])) ? sprintf(TEXT_EXISTING_PRODUCT, tep_output_generated_category_path($current_category_id)) : sprintf(TEXT_NEW_PRODUCT, tep_output_generated_category_path($current_category_id)); ?></h1> to something like
    <h1 class="pageHeading"><?php echo $pageHeading; ?></h1> And then after (at line 432)
    $form_action = (isset($_GET['pID'])) ? 'update_product' : 'insert_product'; add
    $pageHeadingFormatText = (isset($_GET['pID'])) ? TEXT_EXISTING_PRODUCT : TEXT_NEW_PRODUCT $pageHeading = sprintf($pageHeadingFormatText, tep_output_generated_category_path($current_category_id)); $OSCOM_Hooks->call('categories', 'newProductForm'); Then you can install your change into a hook listener and it will persist.  E.g.
    if (isset($_GET['pID'])) { global $pageHeading, $pageHeadingFormatText; $existingProductText = $pInfo->products_model . ' => ' . tep_get_products_name($pInfo->products_id, $languages[$i]['id']) . ' > ' . tep_output_generated_category_path($current_category_id) $pageHeading = sprintf($pageHeadingFormatText, $existingProductText); } And you just need to convince @burt to incorporate the changes into the core code and your custom version will persist through install. 
    As is, you would have to manually make a core code change every time admin/categories.php is updated.  Because I think that there are a lot of other store owners who could hardly care less about products_model.  So that part of your suggestion is unlikely to make it into core.  But a new hook is highly likely to make it into core.  Because a new hook empowers store owners to pick their own implementations. 
  6. Like
    ecartz got a reaction from astecme in Date entered on product copy is wrong.   
    Sorry, I guess we should have noticed this earlier.  I would try looking at the query that *reads* the date when the product is displayed.  Because if changing the database value doesn't fix it, that isn't an insert problem. 
    The query that inserts the date seems to be correct. 
    tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_price, products_cost, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_gtin) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "' , '" . tep_db_input($product['products_cost']) . "', now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "', '" . tep_db_input($product['products_gtin']) . "')"); You also may want to consider the difference between products_date_added and products_date_available.  It copies the date available but sets a new date added. 
  7. Like
    ecartz got a reaction from freakystreak in Unknown modifier problem   
    A regular expression is supposed to be "starting delimiter", the regular expression, "ending delimiter", modifiers (if any).  If the "ending delimiter" appears in the regular expression, it ends it early.  So something like
    '//d/' is invalid, as it thinks that it is trying to match an empty regular expression under a d modifier.  To fix that example, you could change it to
    '/\/d/' Which would match a forward slash followed by the letter d.  But since the regular expression is generated dynamically from the currency symbol in this case, we can't just fix it.  The preg_quote function goes through and escapes any regular expression syntax in the string.  In particular, we told it the delimiter was a / and to escape any occurrences of that in the currency symbol.  Or to put this another way, it would turn the first string into the second string. 
  8. Like
    ecartz got a reaction from LeeFoster in [Contribution] Multi Pickup   
    In includes/modules/shipping/multipickup.php, around line 61, find
    while ($store = tep_db_fetch_array($qstores)) { and change to
    $this->quotes['methods'] = array(); while ($store = tep_db_fetch_array($qstores)) { One line added.  No existing lines changed. 
  9. Like
    ecartz got a reaction from peterpil19 in Framework searched for Homepage   
    So you want to go to https://www.attias.ch/angebot.html and have it look like https://www.attias.ch/ishop/conditions.php (with different text of course)?  If you're OK with changing the name to angebot.php, you could just make copies of the conditions page files. 
    angebot.php from conditions.php includes/languages/german/angebot.php from includes/languages/german/conditions.php In the new file, change
    require('includes/languages/' . $language . '/conditions.php'); $breadcrumb->add(NAVBAR_TITLE, tep_href_link('conditions.php')); to
    require('includes/languages/' . $language . '/angebot.php'); $breadcrumb->add(NAVBAR_TITLE, tep_href_link('angebot.php')); and in the language file, change
    define('NAVBAR_TITLE', 'Conditions of Use'); define('HEADING_TITLE', 'Conditions of Use'); define('TEXT_INFORMATION', 'Put here your Conditions of Use information.'); to reflect what you want to show, e.g.
    define('NAVBAR_TITLE', 'Unser Angebot'); define('HEADING_TITLE', 'Unser Angebot'); define('TEXT_INFORMATION', <<<'EOTEXT' <h2>Briefmarken</h2> <p>Schweiz ab 1850 Einzelmarken/Sätze ab 40 % SBK</p> <p>Rayon, Strubel, Sitzende Helvetia, Stehende Helvetia, Ziffermarken, Tellknaben und Brustbild, Freimarken, Werbemarken, Pro Juventute, Pro Patria, Blocks, Zuschlagsausgaben, Automaten-Marken, Rollenmarken, Porto Marken, Zusammenhängende, Zwischenstege, Kehrdrucke, Dienstmarken, Stempel Neuheiten, Schweizer Neuheiten, Schweizer Spezialitäten, Jahreszusammenstellungen, Abarten, Postfrisch , Gestempelt, FDC's, Vollstempel, Ersttag Vollstempel, Frankaturware etc... Diverse Länder</p> <p>UNO Genf, Deutschland (in Bearbeitung).<br /> Posten und Sammlungen</p> <p>Kleine Posten und Sammlungen ab 10.-, Kiloware Schweiz und Ausland (Briefmarken zum Ablösen), Länder- und Motivsammlungen je nach Angebot.</p> <p>Wühlkiste - jeder Brief 1.- Stutz - hier findet jeder einen kleinen Schatz. Ansichtskarten</p> <p>Weit über 15'000 Schweizer Ansichtskarten am Lager (Litho, Lichtdrucke, Foto-AK's). Zubehör</p> <p>Briefmarken-Kataloge (SBK, Zumstein, Michel), Sammler-Zubehör von Leuchtturm (einiges am Lager), Lindner auf Bestellung. Hüllen für Ansichtskarten und Briefe, Archivierung etc., Briefmarken Alben, Systemalben für Briefmarken, Briefe, FDC, Ansichtskarten, Vordruckalben, Pinzetten, Lupen etc.<br /> Fehllisten Bearbeitung</p> <p>Wir bearbeiten gerne Ihre Fehllisten für Briefmarken, falls die gewünschten Marken nicht am Lager vorrätig sind, suchen wir Sie gerne kostenlos in Ihrem Auftrag und offerieren Ihnen diese. Hier können Sie uns mitteilen, was Sie suchen, bzw. was Ihnen fehlt.</p> <p>Briefmarken-Neuheiten können bei uns im Abonnement bezogen werden!</p> EOTEXT ); I prefer the nowdoc syntax for multiple line strings.
    There are also contributions like Page Editor , but it doesn't look like that's been updated for Phoenix.  If you have budget, you could pay someone to do that.  Either post in the Commercial Support Inquiries forum or PM @burt to see if he has something like that for Phoenix Supporters (annual fee required). 
    If it's important that the name end in .html, then you could configure Apache's mod_rewrite to do that. 
  10. Like
    ecartz got a reaction from peterpil19 in Framework searched for Homepage   
    With mod_rewrite (Apache), you don't even have to redirect.  It is quite capable of serving the content of angebot.php when angebot.html is requested. 
    I'm not sure that's necessary.  Google is quite capable of crawling .php pages with static content.  For example, searching for "Put here your Conditions of Use information." returns results from multiple osCommerce sites, even though that is certainly useless content. 
    Documentation:  https://httpd.apache.org/docs/trunk/rewrite/remapping.html
    High ranked internet tutorial:  https://aloneonahill.com/blog/url-rewriting-for-beginners
    Example:
    RewriteEngine On RewriteRule ^angebot.html$ angebot.php [L] When angebot.html is requested, that will serve the content from angebot.php .
    Or with redirect:
    RewriteEngine On RewriteRule ^angebot.html$ angebot.php [R=308] Change the redirect code as appropriate (e.g. 301, 307, etc.).  The default is a 302, but that seems unlikely to be what you want here (302 means that people should continue to request the redirected URL, as the target is only temporary; presumably you'd be doing this permanently). 
    Nginx may have similar capabilities, but I don't know how they work. 
  11. Like
    ecartz got a reaction from peterpil19 in Responsive-osCommerce-Admin and Phoenix?   
    While Microsoft Windows only releases a new name once every couple years (rarely as much as four), it releases service packs (now called builds) more often (I counted twenty-four releases since 1995, ignoring NT, 2000, and XP Professional x64).  Plus it releases bugfixes every month and occasionally between. 
    In the last six years, @burt has released two named versions:  Frozen and Phoenix (Windows had 8.1 and 10 in the same period).  Four service pack level versions (Frozen, Phoenix 1.0, 1.1, and 1.2).  Less than twenty point versions (compare to seventy or so from Microsoft Windows).  I suppose the next level would be to count commits as the equivalent of the individual packages that get installed in the monthly rollup for Microsoft Windows.  I don't know the magnitude of that. 
    Apple iOS has eight named releases in the last six years.  And twenty-five minor releases.  I don't know how many point releases, but it's had more minor releases than Phoenix has had point releases.  It's had four point releases in the last month. 
    If fewest version updates is your criterion for evaluating stability, community edition (Frozen/Phoenix) is more stable than Windows or iOS.  Of course, one of the problems is that with Windows/iOS, most updates happen in the background whereas Phoenix is still updated manually.  So with Phoenix one is more aware of the updates than with the operating systems. 
  12. Like
    ecartz got a reaction from freakystreak in Unknown modifier problem   
    Hmm....  That doesn't seem as helpful as I'd hoped. 
    Try changing
    $search_for = array( '/'.$currency_sym.'/', '/Â/', '(<[a-z/]*>)' ); to
    $search_for = array( '/'. preg_quote($currency_sym, '/') .'/', '/Â/', '(<[a-z/]*>)' ); And see if it still gives the same warning on the same line.  I tend to agree that we're missing something.  We should be able to answer
     
    I suppose it's barely possible that it's complaining about the currency symbol being empty.  But I don't see how that gets us to a d. 
  13. Like
    ecartz got a reaction from peterpil19 in Framework searched for Homepage   
    So you want to go to https://www.attias.ch/angebot.html and have it look like https://www.attias.ch/ishop/conditions.php (with different text of course)?  If you're OK with changing the name to angebot.php, you could just make copies of the conditions page files. 
    angebot.php from conditions.php includes/languages/german/angebot.php from includes/languages/german/conditions.php In the new file, change
    require('includes/languages/' . $language . '/conditions.php'); $breadcrumb->add(NAVBAR_TITLE, tep_href_link('conditions.php')); to
    require('includes/languages/' . $language . '/angebot.php'); $breadcrumb->add(NAVBAR_TITLE, tep_href_link('angebot.php')); and in the language file, change
    define('NAVBAR_TITLE', 'Conditions of Use'); define('HEADING_TITLE', 'Conditions of Use'); define('TEXT_INFORMATION', 'Put here your Conditions of Use information.'); to reflect what you want to show, e.g.
    define('NAVBAR_TITLE', 'Unser Angebot'); define('HEADING_TITLE', 'Unser Angebot'); define('TEXT_INFORMATION', <<<'EOTEXT' <h2>Briefmarken</h2> <p>Schweiz ab 1850 Einzelmarken/Sätze ab 40 % SBK</p> <p>Rayon, Strubel, Sitzende Helvetia, Stehende Helvetia, Ziffermarken, Tellknaben und Brustbild, Freimarken, Werbemarken, Pro Juventute, Pro Patria, Blocks, Zuschlagsausgaben, Automaten-Marken, Rollenmarken, Porto Marken, Zusammenhängende, Zwischenstege, Kehrdrucke, Dienstmarken, Stempel Neuheiten, Schweizer Neuheiten, Schweizer Spezialitäten, Jahreszusammenstellungen, Abarten, Postfrisch , Gestempelt, FDC's, Vollstempel, Ersttag Vollstempel, Frankaturware etc... Diverse Länder</p> <p>UNO Genf, Deutschland (in Bearbeitung).<br /> Posten und Sammlungen</p> <p>Kleine Posten und Sammlungen ab 10.-, Kiloware Schweiz und Ausland (Briefmarken zum Ablösen), Länder- und Motivsammlungen je nach Angebot.</p> <p>Wühlkiste - jeder Brief 1.- Stutz - hier findet jeder einen kleinen Schatz. Ansichtskarten</p> <p>Weit über 15'000 Schweizer Ansichtskarten am Lager (Litho, Lichtdrucke, Foto-AK's). Zubehör</p> <p>Briefmarken-Kataloge (SBK, Zumstein, Michel), Sammler-Zubehör von Leuchtturm (einiges am Lager), Lindner auf Bestellung. Hüllen für Ansichtskarten und Briefe, Archivierung etc., Briefmarken Alben, Systemalben für Briefmarken, Briefe, FDC, Ansichtskarten, Vordruckalben, Pinzetten, Lupen etc.<br /> Fehllisten Bearbeitung</p> <p>Wir bearbeiten gerne Ihre Fehllisten für Briefmarken, falls die gewünschten Marken nicht am Lager vorrätig sind, suchen wir Sie gerne kostenlos in Ihrem Auftrag und offerieren Ihnen diese. Hier können Sie uns mitteilen, was Sie suchen, bzw. was Ihnen fehlt.</p> <p>Briefmarken-Neuheiten können bei uns im Abonnement bezogen werden!</p> EOTEXT ); I prefer the nowdoc syntax for multiple line strings.
    There are also contributions like Page Editor , but it doesn't look like that's been updated for Phoenix.  If you have budget, you could pay someone to do that.  Either post in the Commercial Support Inquiries forum or PM @burt to see if he has something like that for Phoenix Supporters (annual fee required). 
    If it's important that the name end in .html, then you could configure Apache's mod_rewrite to do that. 
  14. Thanks
    ecartz got a reaction from peterpil19 in Problems with new customer email being marked as SPAM   
    For future reference, another possibility is to check if you've been blacklisted.  https://mxtoolbox.com/blacklists.aspx
    If you look in the extended headers of an email that you send to yourself, you can get all the IPs through which the email passed. 
    A blacklist would have exactly the behavior that you describe.  It will start without warning or changes.  And stop the same way. 
  15. Like
    ecartz reacted to BrockleyJohn in Frozen bug list   
    I suggest
    if ( ! is_array($params) ){ $params = array(); } if ( ! isset($params['type']) ) { $params['type'] = 'submit'; } instead. That prevents you losing other parameters if type is not set.
  16. Like
    ecartz got a reaction from JcMagpie in display number of items per page   
    I don't think that is the right place.  Look for
    $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'p.products_id'); and replace it with
    if (!tep_session_is_registered('max_products_per_page')) tep_session_register('max_products_per_page'); if (!isset($max_products_per_page) || !is_integer($max_products_per_page) || ($max_products_per_page < 1)) $max_products_per_page = MAX_DISPLAY_SEARCH_RESULTS; if (isset($HTTP_GET_VARS['mppp']) && is_numeric($HTTP_GET_VARS['mppp']) && ($HTTP_GET_VARS['mppp'] > 0)) $max_products_per_page = intval($HTTP_GET_VARS['mppp']); $mppp_list = array(); for ($i = 1; $i <= 5; $i += 1) { //change $i <= 5 to show more or less page options, default is 5 (Example: 12, 24, 36, 48, 60 (total: 5 options)) $mppp = intval($i * 12); //change $i * 12 for products shown per page, default is 12 $mppp_list[] = array('id' => $mppp, 'text' => $mppp); } $mppp_list[] = array('id' => 9999999, 'text' => TEXT_ALL_ITEMS); $gvhf = ''; $ignore = array('page', 'mppp'); if (is_array($HTTP_GET_VARS) && (sizeof($HTTP_GET_VARS) > 0)) { reset($HTTP_GET_VARS); while (list($key, $value) = each($HTTP_GET_VARS)) { if ( (strlen($value) > 0) && ($key != tep_session_name()) && (!in_array($key, $ignore)) ) { $gvhf .= tep_draw_hidden_field($key, $value); } } } $maxpppform = tep_draw_form('prod_per_page', basename($PHP_SELF), 'get') . $gvhf . tep_draw_pull_down_menu('mppp', $mppp_list, $max_products_per_page, 'class="form-control input-sm" style="width:70px;" onchange="this.form.submit()"') . '</form>'; $listing_split = new splitPageResults($listing_sql, $max_products_per_page, 'p.products_id'); Then put the
    <form class="form-inline pull-right"> <label class="control-label"><?php echo TEXT_SHOW; ?></label> <?php echo $maxpppform; ?> </form> Wherever you have it now (so long as it is after the other code that you added), as that is working. 
    It's also worth noting that Edge already has a version of this.  You might check to see if Frozen does as well.  If so, you might be better off just updating to Frozen rather than trying to figure out how to implement this.  Another thing is that you may want to replace $HTTP_GET_VARS with $_GET everywhere that it appears.  And there may be similar issues that aren't leaping out at me. 
  17. Like
    ecartz got a reaction from sandipmakwana in Quantity box with plus and minus buttons   
    Does the plus/minus buttons contribution actually update the cart without a page refresh? Or does it instead update the page and then you submit the quantity when you click the add to cart button (which refreshes the page)?
     
    And the fast update contribution submits the page every time you delete a product or change the quantity, right? So you want to be able to make all your quantity updates before updating the cart (like you would normally do)? There might be user confusion in that they will have changed the quantity on the page but never submitted the page so that it is not updated on the server.
     
    What happens on a delete? Should it update the quantities? Or just delete the item? I think that the way it works now, you would have to update the quantities, just as if you had clicked the update cart button. Or you would need to remove the instant delete so that it only deletes when you click on the update cart button (the original way that the cart worked). Or you would need to redo the instant delete functionality (unfortunately without help from the plus/minus contribution, which doesn't deal with multiple products).
     
    Does it sound like I'm understanding what you want to do? I haven't used these particular contributions previously, so I may be misunderstanding somewhere.
  18. Like
    ecartz got a reaction from caminho in Basic Template Structure 1.7   
    When I upload it, BTS 1.7 will be updated to the 2.2 RC2a standards. From the changelog:
    The Basic Template Structure location in the contributions area remains the same.  
    There is no functional improvement in this release. The only changes are to increase compatibility with RC2a. Therefore, no upgrade instructions have been provided. If you are using an older version, you can continue to do so. If you launch a new RC2a store, you can use this version.
×