Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by ecartz

  1. That suggests to me that the team (or at least Mark) is actively looking for code patches. Note that the issue tracker also offers a place to submit files, which can include code patches.
  2. I'll leave your other questions to Mark or someone else in the know, but I can tell you that the issue tracker (also called the bug reporter) is at http://svn.oscommerce.com/jira/secure/Dashboard.jspa More specifically, 3.0 Alpha 5: http://svn.oscommerce.com/jira/secure/Issu...orter/order=ASC I believe that you would be looking for bugs that are reported against alpha 5 but are not assigned a fix version. Or for code fixes that are assigned a fix version but are not assigned a fixer. The issue tracker does have a place to attach a screenshot.
  3. It's not just that you don't need it. It's actively harmful to put a ?> in a pure PHP file that might have headers sent after it is included. The effect is to take you out of PHP context and put you into HTML context. However, you don't want to produce output while in HTML context. as it will then break any redirects or other HTTP headers that get sent after that. It's more robust to not use the ?> and end the file in PHP context. You can see this discussed more in the Zend Coding Standards, which prohibit the use of ?> in a pure PHP file (i.e. one that does not produce HTML output).
  4. ecartz

    Checkout Redux [Support Thread]

    modules/checkout_notification.php and ext/modules/payment/paypal/standard_ipn.php send emails. If you are using the PayPal module that came with the contribution, the order email should come from the IPN module in ext. Are the order statuses updating? You should see a Preparing status and then a Pending status (or whatever your defaults are). In ext/modules/payment/paypal/standard_ipn.php there is a line that says $send_debug_email = false; You could try changing it to true to see if it tells you anything useful. Note that it requires that the debug email to be set in admin >> Modules >> Payment, under the settings for the paypal standard module.
  5. ecartz

    Basic Template Structure 1.7

    For others who might encounter the same problem, it looks like illegal template directory is caused by if ((ereg('^[[:alnum:]|_|-]+$', $tplDir)) && (is_dir (DIR_WS_TEMPLATES_BASE . $tplDir))){ // 'Input Validated' only allow alfanumeric characters and underscores in template name define('DIR_WS_TEMPLATES', DIR_WS_TEMPLATES_BASE . $tplDir . '/' ); } else { if($bts_debug === TRUE) echo strip_tags($tplDir) . '<br>'; exit('Illegal template directory!'); } And then at the top of the includes/configure_bts.php there is $bts_debug = FALSE; If you change that to $bts_debug = TRUE; then it should show you what the bad value is. The most likely explanation for this that I can see would be failing to run the BTS.sql file in phpMyAdmin or similar utility, as that sets the default template directory. A way to check this is to go to admin >> Configuration >> My Store and see if the three BTS configuration options appear. The default template directory should start as help. A second possibility is that the templates/help folder did not get uploaded to the shop. A third possibility is that it is looking in the wrong place for the templates directory, e.g. in the site root rather than the shop folder. This might be verified by changing the original code that I posted to if ((ereg('^[[:alnum:]|_|-]+$', $tplDir)) && (is_dir (DIR_FS_CATALOG . DIR_WS_TEMPLATES_BASE . $tplDir))){ // 'Input Validated' only allow alfanumeric characters and underscores in template name define('DIR_WS_TEMPLATES', DIR_WS_TEMPLATES_BASE . $tplDir . '/' ); } else { if($bts_debug === TRUE) echo strip_tags($tplDir) . '<br>'; exit('Illegal template directory!'); } Only the first line changed, with DIR_FS_CATALOG . added. Note that I haven't tried this code, because I haven't encountered this situation. This change might get you past this error only to get a different error or erroneous behavior (rather than an error message).
  6. I believe that Paul Mathot did a test of this a while back. You might find it in one or more of the BTS packages. As I recall, all three methods (stock osCommerce, STS, BTS) had similar times. Neither STS nor BTS offer any page caching integration. I believe that the normal caching methods should still work, but don't quote me on that. I haven't tried caching with STS or the BTS. The part that stays the same from page load to page load with the STS is the template. Since the template is just a static HTML file, I'm not sure what would be cached. The way that the STS works is it generates the normal osCommerce page with the normal HTML and uses the PHP ob handler to capture part of the output. It then trims off the HTML that it doesn't like and uses the captured pieces to fill in values in the template file. Conceptually, the STS is wasteful. It generates an entire page to use only part of it. In practice though, the waste is entirely PHP time and is a very small part of the overall page generation. Well, it starts to do so. Essentially how the BTS works is that it divides each file into three parts: a data part, a common HTML part, and a page specific HTML part. The data part is essentially the part of the original file that occurs before the HTML starts. The common part is the header, footer, and columns for each page. Note that this includes the head section. The page specific HTML part is what renders the central portion of the page. Beyond that, the BTS makes very few changes to the code. If you put the BTS files in a diff tool with the stock osCommerce files, it basically shows a bunch of lines that are the same, and then a bunch more that are in the stock file but not the BTS file. Unfortunately, there is still layout and logic integration in that. I haven't had any problems installing contributions with the BTS. Since it basically just splits the relevant portions of the file into two parts (contributions usually don't change the common part--more about that later). It's just a matter of opening two files to make the changes rather than just one. It's not a mindless activity where you simply follow the instructions, but it's not exceptionally difficult either. With a contribution that does change the common part of the page (e.g. Jack's Header Tags SEO), you need to make the changes in the common template. This actually demonstrates the power of using the BTS. For Header Tags SEO, part of the instructions are to open as many of the files as you want to have use the system and make the same change in each file. The BTS specific instructions say to open one file and make the change to that one file. The STS instructions say to open a file and change it and then have you make three other changes to make that change work. In general, that's been my experience of the two. The BTS has you make the same changes but in different places. The STS has you make new changes to enable the change that the contribution would make. If someone else has already done the STS integration, you are back to just following instructions. If not, then you need to have PHP knowledge to integrate the contribution into the STS -- unless you are fortunate enough that the contribution only changes existing output that the STS passes through. The STS is good at allowing someone who knows HTML but not PHP to change the osCommerce layout. However, once you have it installed, you are limited to the following options: only installing contributions that are STS compatible; learning PHP and the STS so as to be able to modify contributions to be STS compatible; paying someone to integrate contributions with the STS. Obviously, the second option makes a mockery of the original reason to install STS. However, for those who are comfortable with the idea of paying to have non-STS compatible contributions integrated, it does provide the easy layout changes. The BTS is good for someone who either likes changing among different layouts or who simply doesn't like making the same change to thirty odd files. Like the STS, it also requires that you understand a bit about PHP and how the BTS works in order to integrate contributions (especially those that add new pages to the catalog side). I don't believe that it has ever claimed to be good for people who don't know PHP, and it isn't. It's designed for a developer to use to make changes in one place and have them affect the entire site. If the goal is to be able to easily allow store owners to integrate contributions, then it doesn't really matter how you change the layout of the site: manually, with the STS, with the BTS. Making significant layout and HTML changes will break existing contribution install instructions because the existing 2.2 series code does not separate layout and logic. Therefore, contribution install instructions will tell you to find the logic embedded in the existing layout and change it. If you change the layout, then the markers for the instructions are lost as well. The obvious solution would be the osCommerce 3 version. Its presence will keep there from being a BTS for v3 (there might still be an STS, as the purpose is different). If the goal is to have a template system for which all contributions will be available, this will be the only game in town. Of course, it hasn't been released yet, so the contribution support is not there. However, contribution support for v3 will grow, while 2.2 will start to wane.
  7. ecartz

    Checkout Redux [Support Thread]

    Well, I don't get that error, so my first guess would be no. :) Anything is possible though. Have you tried using a different country? If it works for the US and fails for the UK, can you give me an example address? For the US, one that validates through PayPal is 1600 Pennsylvania Ave, Washington, District of Columbia, 20500. Other countries should have similar public addresses that can be tried, e.g. 10 Downing St in the UK. Does this happen both with accounts created during checkout and with existing accounts? To help with debugging this, I might turn off javascript in the browser and go through checkout. On the page that says that since you have javascript off, we can't redirect you automatically, do a view source. Somewhere in the HTML, you should have hidden inputs with country values. What are they?
  8. ecartz

    Checkout Redux [Support Thread]

    There is no reason why you can't customize the look of checkout_redirect; however, I would avoid putting links on that page. Thus, I would recommend against including the standard header, footer, and columns. Making it fixed width and centered would not be a problem. If the background images are getting cached properly, they shouldn't be a problem either. If they are not caching, they could slow down the page, which would be undesirable.
  9. ecartz

    Checkout Redux [Support Thread]

    That's a Zend best practice: http://framework.zend.com/manual/en/coding...ding-style.html As those files are pure PHP, there's no point in them switching to HTML context, which is what the ?> does. Doing so gives rise to problems with headers already sent, as white space at the end of the file is interpreted as content rather than whitespace. Unfortunately, there's not much that can be done with the <?php at the beginning of the file, since PHP does not have a supported way of including files as PHP code rather than HTML (I suppose that one could hack something together with eval).
  10. Try moving them to the bottom of the file rather than the top. You currently have them before the configure.php file gets parsed, so the DIR_WS_CLASSES is not set, thus your error.
  11. The approach that I would take would be to go to includes/modules/product_listing.php, find the following code (around lines 131 - 134): 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')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW) . '</a> '; break; and replace it with something like case 'PRODUCT_LIST_BUY_NOW': switch ($current_category_id) { case '37': $buy_now_button = tep_image_button('button_buy_now_37.gif', IMAGE_BUTTON_BUY_NOW);break; case '35': case '33': $buy_now_button = tep_image_button('button_buy_now_3X.gif', IMAGE_BUTTON_BUY_NOW);break; default: $buy_now_button = tep_image_button('button_buy_now.gif', IMAGE_BUTTON_BUY_NOW); } $lc_align = 'center'; $lc_text = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $listing['products_id']) . '">' . $buy_now_button . '</a> '; break; This example would show one buy now button only on category 37; another buy now button on categories 33 and 35; and the original buy now button on everything else.
  12. ecartz

    Automatic generation of URLs?

    You should only have one URL per page for Google purposes. I would recommend updating the XML. It looks like you could just change function hrefLink($page, $parameters, $connection, $add_session_id) { if ( defined('SEO_URLS') && SEO_URLS == 'true' || defined('SEO_ENABLED') && SEO_ENABLED == 'true' ) { return tep_href_link($page, $parameters, $connection, $add_session_id); } else { return $this->base_url . $page . '?' . $parameters; } } # end function to function hrefLink($page, $parameters, $connection, $add_session_id) { return tep_href_link($page, $parameters, $connection, $add_session_id); } # end function and it would work.
  13. ecartz

    Help finding error

    Line 71: 'banner.jpg', (tep_not_null($header_tags_array[logo_text']) ? should be 'banner.jpg', (tep_not_null($header_tags_array['logo_text']) ? Note the ' before logo_text. Also, a code editor with syntax highlighting would make problems like that easier to find. Free examples include Notepad++ and Eclipse.
  14. You'd have to install a different SEO URLs contribution. Note that the -c-34 is what tells it what category you are viewing. If you install a contribution that takes it out, then you either have to add all your categories to the .htaccess or you need to look up the category name in the database. It's simpler (and more efficient) to just leave it, and for SEO purposes, it is irrelevant.
  15. Try changing the .htaccess to RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%{QUERY_STRING} [R] RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING} [R] RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING} [R] RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING} [R] RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING} [R] RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING} [R] RewriteRule ^(.*)-pr-([0-9]+).html$ product_reviews.php?products_id=$2&%{QUERY_STRING} [R] RewriteRule ^(.*)-pri-([0-9]+).html$ product_reviews_info.php?products_id=$2&%{QUERY_STRING} [R] RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING} [R] Backup first, as you will want to revert this later. The point is to find out to where it is rewriting your URLs. Another thing to check is that maybe you should have RewriteBase / instead of /catalog/
  16. ecartz

    Installation problem

    The tep_href_link function should be defined in includes/functions/html_output.php That file should be included by includes/application_top.php which should be included by the page that you are trying to load. If all pages are not working (possibly with different errors), then it is likely either includes/functions/html_output.php or includes/application_top.php. If just the one page is not working, it might be a problem in that page.
  17. If the URLs were not working, then it might be a .htaccess issue, but if the links aren't SEO URLs, then it's a code or configuration issue. Try looking into includes/classes/seo.class.php or admin >> Configuration >> SEO URLs. Another option would be to try installing a different version of the contribution (either older or newer). Perhaps the one that is installed now has a bug in it.
  18. ecartz

    Any potential pitfalls using the new SagePay Direct module?

    Not Harald, but I can answer this: yes, that's in the settings on the Sage Pay site. You are essentially giving it a whitelist of IPs that can process payments on your account. Apparently Sage Pay will reject payment requests from other IPs. When you sign up for a simulator account, they should send you a link to the simulator which you can use to change settings, etc.
  19. ecartz

    Purchase Without Account

    But what about the choice is making them more secure? It's obviously not the reality of the data handling, because while PWA deletes the data from the customers table (when everything works), it leaves it in the orders table. Is it that they feel that creating the account is a barrier? Would it be enough to simply not label it creating an account? That's what I did in my latest add on. I create the account but without requiring a password. If the customers want to actually use the account, they need to "activate" it, which resets the password and emails it to them. That gives the customer the option of not activating the account if they are not going to use it again. I call it Purchase before Account functionality. Would that be enough to make your customers feel secure? Or is it something else? At one point, I was going to create the account on the checkout success page (and offer the customer a chance to pick a password), but I decided that that would not be robust (checkout_success is not a required page in the payment process). However, by that time, I already had working code that used the express checkout version of $sendto and $billto (i.e. arrays) to progress through the checkout. As such, a true Purchase without Account module could be written that never saves the customer information anywhere other than in the order. No dummy customers and address_book rows that get deleted later. Just session variables. I've also seen people talk about a faster checkout and avoiding extra steps. However, the registration only slows down the checkout if you let it. In my add on, I create a new checkout login page where there are two forms. In one form, the customer can login (just like in login.php; in fact, it posts to login.php). In the other form, the customer can enter shipping and contact information. If the customer uses the latter form, an account is created and they go to checkout_shipping.php. This saves two clicks from the standard osCommerce checkout (the click to go to the registration page and the click to leave the create account success page and go back to checkout) and one from Purchase without Account (the one where the customer chooses a guest checkout). The account gets created and it uses fewer steps than does Purchase without Account.
  20. ecartz

    error when I try to upload file

    You might want to try the Option Types V2 contribution instead. It is newer and more likely to be compatible with the latest osC.
  21. ecartz

    Downloadable files?!?

    There is a contribution called Super Download Shop that is supposed to help with these kinds of issues. Also, in admin >> Localization >> Order Statuses, you can change Pending to support Downloads. I.e. make it so that when the Order Status is pending, the product is downloadable.
  22. This contribution isn't really supported anymore. You might get better luck with Option Types v2 which is based on this contribution, along with the AJAX Attribute Manager. In particular, I believe that it includes image preview for logged in users. I probably should create an updated version of this contribution that points this out. You should be able to adjust quantity on the shopping cart page (in either contribution). You could also add one of the quantity update mods (on the product_info page) along with these contributions. They should be reasonably compatible.
  23. Perhaps Master Products, or one of the similar contributions, like Bundled Products.
  24. ecartz

    GUID help

    Not sure what this has to do with payment modules, and this is more a QuickBooks thing than an osCommerce thing. You might get better help on their forums. However, as best I can tell, the owner ID is something that you make up. It's only significance is that it be different from the owner IDs that others use and that your application always passes the same one. It's specific to you, so your owner ID should be different from someone else's owner ID, even if they are also integrating with osCommerce (otherwise, you could read each other's data). If you think of it as a password with a special format, that's probably close enough. I don't know about the appropriateness of posting a link, but googling for "generate GUID online" returns results. The whole snippet from the Quickbooks Web Connector Programmer's Guide:
  25. I think that there are two options (short of disabling Ultimate SEO URLs). The no code option is to turn off W3C URLs in Ultimate SEO. The option that I prefer is to change tep_redirect (in includes/functions/general.php) to //// // Redirect to another page or site function tep_redirect($url) { $url = str_replace('&', '&', $url); if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) { tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false)); } if ( (ENABLE_SSL == true) && (getenv('HTTPS') == 'on') ) { // We are loading an SSL page if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL } } header('Location: ' . $url); tep_exit(); } However, I haven't tested that, so it may need more work. The next thing that I would try if that doesn't work would be changing the str_replace line to $url = htmlspecialchars_decode($url);