Milonic and osCommerce

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
AangepasteAuto
Advanced
Advanced
Posts: 13
Joined: Wed Jun 15, 2005 1:06 pm
Contact:

Milonic and osCommerce

Post by AangepasteAuto »

I am a happy user of the PHP/MySQL... yes the PHP/MySQL version of the menu.

Now I'm working on a new site that will run osCommerce (you guessed it it'll be a shop). And I would like to replace that crappy menu on the left that comes standard with osCommerce with the Milonic menu.

But now I have the following question. How do I adapt the Milonic menu that it will use the "categories" and "categories_description" (my guess is that makes up the menu in osCommerce) so when I change the categories in the admin panel it will change in the menu also.

Next to that I would still like to use "mm_projects" and "mm_styles" so I can still style the menu.



Since I have no real PHP/MySQL knowledge I was hoping someone here can tell me how this is done?

Thank you! :oops:
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

I think we can build an OSCommerce module for the menu :D

Let us know what site this is for and how you want the menu to appear, menu structure from categories etc.

You'll have to work with us on this and it may take a while to complete but it's worth it.

Cheers,
Andy
AangepasteAuto
Advanced
Advanced
Posts: 13
Joined: Wed Jun 15, 2005 1:06 pm
Contact:

Post by AangepasteAuto »

The site is not online. I'm still "playing" with it.

Well I was thinking either a menu what shows the main categories and when you click on a categorie it slides open showing the sub-cats.
Or the standard vertical plain text menu and this linked to the categories tabels from osCommerce.

If the sliding is possible something like

Code: Select all

Cat1
      sub1
      sub2
Cat2
would be nice. With the stability/stylability of Milonic.

Not sure if would be possible. And I would add the images I have on the other site (http://www.aangepasteauto.nl) to it to make it look the same. I did this all in mm_styles.


Not to sound cheap or anything but... will this be done for the community or will it cost me extra? (I'm but a simple poor poor bloke)
jonjon
Advanced
Advanced
Posts: 16
Joined: Sun Dec 17, 2006 10:59 pm

Also desire oscommerce module

Post by jonjon »

First-time poster here. I have been using the milonic menu (vertical) in a (non public) test site. It works beautifully in any browser. I have integrated the menu file calls within the < head > </head> on root pages of an osCommerce installation but am having trouble with sessions.

Once this is resolved (or is being addressed somehow), I can buy the license for my client and go live.

Andy, I have also searched the forums and find no module/adaptation of the menu system with osCommerce/PHP. The option I am considering is a DynaMenu contribution for osc.

My menu items do NOT need to be populated from the database but they do need the current session ID added somehow. This critical for visitors to keep items in their baskets as they move around the site.

I have seen one posting where a PHP code session snippet was tried under menu_data.js and all that needed to be done to make it function was to rename the file menu_data.php. yes, the menu shows but the session calls don't function.

I have both the osCommerce categories menu and the Milonic menu running side by side.

When I use the osc menu, add an item to basket, I can cruise around the site from page to page and not lose the basket contents. As soon as I click the corresponding Milonic menu, the basket empties.

I am using a shared SSL. Am very willing to share whatever files are necessary to make the Milonic menu function within an osCommerce storefront.

How can I help?

Jon
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I have posted this to Milonic. This is not something I know, shopping carts and sessions, however, there is a site that uses the Milonic menu, it has a shopping cart and I just tested putting items and then using the menu and the items remain. I think the cart is even a menu item. think this person sets the menu/s in tables, but I doubt that is necessary.


http://surlatable.marketlive.com/

I also found this post about shopper IDs. I have no clue if this would give you any help, either.... :? :)

viewtopic. ... 6532#26532

Maybe something here would help.

Ruth
jonjon
Advanced
Advanced
Posts: 16
Joined: Sun Dec 17, 2006 10:59 pm

:)

Post by jonjon »

Thank you, Ruth, for passing on my request :) I am not familiar with the .do extension, as Sur Le Table uses. ASP doesn't help me at all, e.g., calling a session ID, within Milonic menu items. I am not hosted on a windows server.

I am 3 weeks into using PHP and learning fast with hand coding and have done the menu both ways:

1. within the head tags on every page in the root (where necessary)
2. after the body tag with a table cell.

I wonder if it could possibly be made to work built into a table on the column_left.php for osCommerce, rather than inserted after the body tag on every root page (where necessary).

Jon
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

You have lost me. I am a basic html person, :lol: . I find most of my answers by experimenting and know less about php than I do about js, which would maybe fit the head of a pin :)

There is a phptable page in the menu download. In the extras folder under the php and this forum post on it, though it makes no sense to me...
viewtopic. ... 0736#30736

And there's a post about dropping session IDs and again I have not a clue :?

viewtopic. ... 1615#21615

and one about some php variable not working which has a session ID in it, not sure if it's anything you might be able to use.

viewtopic. ... 9760#39760


Ruth
jonjon
Advanced
Advanced
Posts: 16
Joined: Sun Dec 17, 2006 10:59 pm

Post by jonjon »

Thanks again for your reply. I am hoping someone from Milonic is working on this. I may be pushed to load a different menu system to accomplish what I need and will keep the Milonic Menu present but commented out for future testing.

There is a solution to this. I just know there is :)

jon
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Is this the kind of thing you are looking for?

http://oscommerce.milonic.net/catalog/

Consists of just one .php file and a small change to one of the OS Commerce files.

Let me know if this is what you want and I'll generate a .zip for it.

Cheers,
Andy
jonjon
Advanced
Advanced
Posts: 16
Joined: Sun Dec 17, 2006 10:59 pm

Post by jonjon »

Boo-ya! That means "you're the man!" That is just what I'm looking for. Before you zip it up and let me take it out for a test drive, will session IDs be carried along with each item in the menu? I notice the source code has the urls to categories "hard coded." Perhaps I'm not interpreting what I see correctly.

Thank you so much for working on this:)

jon
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

will session IDs be carried along with each item in the menu
I'm working on that now - proving to be a little tricky but certainly not impossible to do.

It should also be pretty dynamic based on info added to the config file.

I'm hoping to get sessions sorted tonight

Cheers,
Andy
jonjon
Advanced
Advanced
Posts: 16
Joined: Sun Dec 17, 2006 10:59 pm

Post by jonjon »

Of interest, I have a search box that functions, and with session IDs in mind, I'd like the currency switchable while retaining the session (possible?) :?: . In the currency sample below, the code is obviously wrong but may be resolved with your solution.

Code: Select all

aI("showmenu=search;text=Keyword Search;");
aI("showmenu=currency;text=Choose Your Currency;");

with(milonic=new menuname("search")){
style=menuStyle;
itemwidth=140;
itemheight=30;
aI("text=`<form name=quick_find action=advanced_search_result.php method=get><input type=text name=keywords size=15 maxlength=20> <input type=image src=scripts/arrow_links_on_search.jpg border=0 alt=Go!></form>`;imagealign=middle;type=form;");
aI("text=Advanced Search;url=advanced_search.php;")
}

with(milonic=new menuname("currency")){
style=menuStyle;
itemwidth=140;
itemheight=30;
aI("text=EURO;url=?currency=EUR&osCsid=...;");
aI("text=USD;url=?currency=USD&osCsid=...;")
}
At the end of the day, if I could just get the sessions carried through the categories, that would be brilliant.

jon
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Take a look at what I have so far.

http://milonic.com/oscommerce-menu.zip

I think there may still be work to do but it's a great start. It takes care of session id's and isn't too difficult to setup.

Let me know if you have any trouble getting it going.

Cheers,
Andy
jonjon
Advanced
Advanced
Posts: 16
Joined: Sun Dec 17, 2006 10:59 pm

Post by jonjon »

Andy, Thank you so much :) I will look at it in the morning (nearly quitting time here). Just to be sure, I need to add the front end of your code on every necessary page at the root, correct? Can this be part of an "include?"

jon
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Here's the instructions:

Download is here: http://milonic.com/oscommerce-menu.zip

Step by step instructions.

1. Create a directory called milonic in the root of your OSCommerce install.
This is normally /catalog/ but can be different depending on your configuration
An example file location is http://oscommerce.milonic.net/catalog/m ... menudom.js

2. Edit the file mm_phpconfig.php and change the $pathToCodeFiles
This needs to be what you see after the domain name part of your website address.
In our example it would be "/catalog/milonic/"

3. Edit oscommerce-menu.php and make changes to any of the style properties
anything after mmStyle-> can be modified and all normal menu properties are available here

4. Edit /catalog/includes/boxes/catagories.php and change this code:


$info_box_contents = array();
$info_box_contents[] = array('text' => $categories_string);

new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- categories_eof //-->

to this:

$info_box_contents = array();
$info_box_contents[] = array('text' => $categories_string);

//new infoBox($info_box_contents);
echo "<a style='font-family:verdana;font-size:10px;' href='http://milonic.com/'>DHTML Menu by Milonic JavaScript</a>";
require_once(DIR_FS_CATALOG.'/milonic/oscommerce-menu.php');
?>
</td>
</tr>
<!-- categories_eof //-->

Thats it!

You only need to edit a few files and that's it, these are includes so shouldn't have to muck about modifying multiple files.

HTH,
Andy
jonjon
Advanced
Advanced
Posts: 16
Joined: Sun Dec 17, 2006 10:59 pm

Brilliant!

Post by jonjon »

Andy,

I'm sorry it took a few days to reply. Loaded everything up today, edited to suit and it's brilliant!

Before the install, I had 2 levels of categories with no products. A few questions perhaps you can help me with:

oscommerce-menu.php

Code: Select all

// Menu Style Goes Here
	$mmStyle=new mmenuStyle();
		$mmStyle->bordercolor="transparent";
		$mmStyle->borderstyle="solid";
		$mmStyle->borderwidth=0;
		$mmStyle->fontfamily="Arial";
		$mmStyle->fontsize="75%";
		$mmStyle->fontstyle="normal";
		$mmStyle->fontweight="normal";
		$mmStyle->headerbgcolor="#996666";
		$mmStyle->headercolor="#000000";
		$mmStyle->offbgcolor="#996666";
		$mmStyle->offcolor="#FFFFFF";
		$mmStyle->onbgcolor="#996666";
		$mmStyle->oncolor="#000000";
		$mmStyle->outfilter="randomdissolve(duration=0.1)";
//		$mmStyle->overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
		$mmStyle->padding=2;
		$mmStyle->separatorcolor="#555555";
		$mmStyle->separatorsize=1;
		$mmStyle->subimage=DIR_WS_HTTP_CATALOG."/milonic/arrow_links.jpg";
		$mmStyle->subimagepadding=3;
		$mmStyle->overimage=DIR_WS_HTTP_CATALOG."/milonic/arrow_links_on.jpg";
		$mmStyle->onsubimage=DIR_WS_HTTP_CATALOG."/milonic/arrow_links_on.jpg";
		$mmStyle->createMenuStyle("menuStyle");



// Create the main menu, note that the PHP property names all match the name of the menu properties
$mmMenu=new mMenu();
$mmMenu->style="menuStyle";
$mmMenu->alwaysvisible="true";
$mmMenu->position="relative";
$mmMenu->menuwidth="100%";
$mmMenu->itemwidth="138";
$mmMenu->itemheight="30";
On the itemheight, it's not having an affect on the fly-out categories (level 2+). What I would like is for every item to be 30 in height.

May I use followscroll with this? I tried it but found the menu rushing to the bottom for its start position!

After the install, I added a "dummy" level 1. As expected, the subimage, etc., do not appear as this Category has no levels beneath.

I then added a level 3 Category. On clearing cache and reloading the page, the following expected elements do not show:

1. subimage, overimage and onsubimage on the level 2 which leads to level 3, nor
2. the Level 3 flyout

Thank you in advance :)

jon
jonjon
Advanced
Advanced
Posts: 16
Joined: Sun Dec 17, 2006 10:59 pm

One more observation

Post by jonjon »

Andy,

I didn't notice it yesterday. After the install, I created the Dummy Level 1 category. It sorted to the top in alpha order. No problem. When clicked, it is picking up the subcategories of the next Level 1 Category down.

Here's my structure.
The ... represents the osCsid session ID, which shows in FireFox but not in IE (I'm not forcing cookies, perhaps that's why).
The ^ indicates the image on/off:

DUMMY (cpath=1...) but shouldn't be same as CARDS

HANDMADE CARDS ^ (cpath=1...)
___General (cpath=1_17...)
___Holidays (cpath=1_4...)

PAPER ^ (cpath=2...)
___Favours (cpath=2_21...)
___Journals ^ <-- should be there, is not (cpath=2-18...)
______Own Words (cpath=2_18_28) This flyout doesn't show up

------------------
Just for the sake of playing around, and since my categort sort order was not defined, I went ahead and defined DUMMY as sort order 1.

It dropped to the bottom of the items list as #3, with cpath=3. I went ahead and defined H/MADE CARDS as #2 and PAPER as #3. The result was back to square one (alpha) with the DUMMY picking up the H/MADE CARDS' cpath=1.

Thank you again for your efforts on this :)

jon
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Do you have a copy of your OSCommerce site that we can see. I'm having trouble picturing the problem.

Cheers,
Andy
jonjon
Advanced
Advanced
Posts: 16
Joined: Sun Dec 17, 2006 10:59 pm

Post by jonjon »

I can't post it publicly as it's not ready. Please give me an email address for you and I'll send it over. :)

jon
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Send it to me at
support4
at
milonic.com
Post Reply