August 10, 2010

tinymce for osCommerce 3 Content Pages



To got a smoove edit for the content pages of your alpha osCommerce 3 you can use this contribution that provides the default tinymce wysiwyg editor for the content pages. The osCommerce contribution can be found here:

http://addons.oscommerce.com/info/7478/v,30

To Use Tinymce on editing osCommerce 3 Standard Sites over the backend Admin->Configuration->Languages[LANGUAGE], you have to do this two changes in one file. It uses the tinymce editor which is included by default in osCommerce v3.0 Alpha 5.

März 07, 2010

Session problems have nothing to do with Simple Suggest

The problem with the shopping cart, one user described, caused not of problems with the ajax simple suggest for osCommerce, it was how I guessed a generally session problem, the user answered in the oscommerce forum:

I figure why my search field throw the products from the basket out, because I hadn't have tep_hide_session_id (); Thanks for your help (if you have another suggestion feel free to say) BR J

some other usefull tipps to fix the session problem can be found in this thread:

März 05, 2010

Session problems

A user told me this:

when I put something in the cart and go to search, enter something in the search field and click search button, find me a product that I have set but all disappeared from the shopping cart.

After I asked some questions he told me his links look like this:

http://localhost/shop/shopping_cart.php?osCsid=f39597ef4bc176592687ea0d5f2d13bb

May he has a generally session problem

November 17, 2009

BUG: First letter special char

Another problem with special chars. If the first letter you type, is a special char, the suggestion wont show. I think the decoding problems caused of different character sets in the MySQL database.

I will test the contribution with some other databases.

BUG: Special Country Chars

Today I have fixed an other little bug in the AJAX Search suggestion for OsCommerce



Cezar99 send me this screenshot from his polish OsCommerce online-shop. The problem can be fixed with the following change in the file searchSuggest.php

Change this line:
//Return each product name seperated by a newline.
echo SIMPLESUGGEST_MARK_SEARCH_CHAR == 'true' ?
str_replace($search,'' . $search . '',htmlentities($suggest['pn']) . "\n"):
htmlentities($suggest['pn']) . "\n";

To this:

//Return each product name seperated by a newline.
echo SIMPLESUGGEST_MARK_SEARCH_CHAR == 'true' ?
str_replace($search,'' . $search . '',html_entity_decode(htmlentities($suggest['pn'])) . "\n"):
html_entity_decode(htmlentities($suggest['pn'])) . "\n";

Now SimpleSuggest should be able to show foreign chars correct in the search suggestion. May chars could not be combined in products name, i tried some polish and a german special char, the german char was not correct decode but this should not be a problem.

November 16, 2009

OsCommerce vs. Magento


Die Weiterentwicklung zur Version 3 von OsCommerce verläuft schleppend. Schon lange ist eine neue OsCommerce Version angekündigt worden, dennoch befindet sich diese immer noch im Alpha Stadium.


Während dieser Zeit mausert sich langsam aber sicher ein neues Shop System an die Spitze. Magento, ein junges aber viel versprechendes Open Source Shop-System. Magento gibt es auch als Enterprise Version zu kaufen. Mit dem kauf erhält man vollen Support so wie ich das auf den ersten Blick sehe und noch einige andere Annehmlichkeiten.

Deutlich macht das auch der Vergleich der Suchabfragen zu Magento und OsCommerce über Google Insights

BUG: searchReq.readyState1 on fast typing

In the SimpleSuggest Contribution for OsCommerce another bug has been registered by cezar99, thanks at this point. If you type fast in the search input box you get an alert:

searchReq.readyState1

At this moment I got no solution, the only way at the time is to change a function in your ajax_search.js.

Try tho remove the else condition in ajax_search.js in the function searchSuggest():
this will only hide the message!

Change:
//Called from keyup on the search textbox.
//Starts the AJAX request.
function searchSuggest() {
if (searchReq.readyState == 4 || searchReq.readyState == 0) {
var str = escape(document.getElementById('txtSearch').value);

searchReq.open("GET", 'searchSuggest.php?search=' + str, true);
searchReq.onreadystatechange = handleSearchSuggest;
searchReq.send(null);
}
else {
alert('searchReq.readyState' + searchReq.readyState);
}
}

To this:
//Called from keyup on the search textbox.
//Starts the AJAX request.
function searchSuggest() {
if (searchReq.readyState == 4 || searchReq.readyState == 0) {
var str = escape(document.getElementById('txtSearch').value);

searchReq.open("GET", 'searchSuggest.php?search=' + str, true);
searchReq.onreadystatechange = handleSearchSuggest;
searchReq.send(null);
}
}

An other little detail who do not work 100% correct at the moment is, if you have a product name including an ß and "Mark search char strong" is activated, the name of the product will be destroyed, cause ß contains an s.

I will correct these things in future.

Update: Other languages and special chars may also generate problems.


Try to use stripslashes instead of htmlentities in searchSuggest.php at this point the problem can be fixed, but my time today goes to the end...

//Return each product name seperated by a newline.
//echo stripslashes($suggest['pn']) . "\n";/*
echo SIMPLESUGGEST_MARK_SEARCH_CHAR == 'true' ?
str_replace($search,'' . $search . '',stripslashes($suggest['pn']) . "\n"):
stripslashes($suggest['pn']) . "\n";//*/