New Zenner
- Join Date:
- Mar 2013
- Location:
- New Orleans
- Posts:
- 81
- Plugin Contributions:
- 0
Event Calendar v3
That will help, but I want to see what is being fed to the browser.
Views: 68,123
New Zenner
That will help, but I want to see what is being fed to the browser.
Totally Zenned
<table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <td width="100%" valign="top"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"> <!-- bof Page heading and New Event button --> <table border="0" width="1080px" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading" height="36">Events Manager</td> <td class="pageHeading" align="right"> <a href="[URL]http://zentestcart.overthehillweb.com/MYSUPERSECRETADMINFOLDER/events_manager.php?action=new"><img[/URL] src="includes/languages/english/images/buttons/button_new_event.gif" border="0" alt="IMAGE_NEW_EVENT" title=" IMAGE_NEW_EVENT " align=absmiddle></a></td> </tr> </table> <!-- eof Page heading and New Event button --> </td> </tr> <tr> <td valign="top"> <!-- bof New Event table --> <script language="javascript"> var scImgPath = '../includes/javascript/spiffyCal/images/'; var start_date = new ctlSpiffyCalendarBox("start_date", "events", "start", "btnDate1","2013-04-05",scBTNMODE_CUSTOMBLUE); var end_date = new ctlSpiffyCalendarBox("end_date", "events", "end", "btnDate2","2013-04-05",scBTNMODE_CUSTOMBLUE); </script> <!-- bof Edit table --> <!-- Edit - event id --> <table class="columnLeft" width="1080px" border="0" cellspacing="2" cellpadding="2"> <!-- <tr> <td colspan="2" align="center" class="main"><b>EDIT</b></td> </tr>--> <tr><!--bof Form--> <form name="events" action="[URL]http://zentestcart.overthehillweb.com/MYSUPERSECRETADMINFOLDER/events_manager.php?&eID=1&action=preview[/URL]" method="post" enctype="multipart/form-data"><input type="hidden" name="securityToken" value="b2f8172baf61cabdaaddbc660ddb533b" /><input type="hidden" name="eID" value="1" /> <td> <table width="100%" border="2" cellspacing="2" cellpadding="4"> <tr><td>Event ID: 1</td><td>Date Added: 2013-04-05 00:13:11</td></tr><!-- Edit - event dates --> <tr> <td class="main">Start Date:</td> <td class="main"><script language="javascript">start_date.writeControl(); start_date.dateFormat="yyyy-MM-dd";</script> <font color="red"> * required </font></td> </tr> <tr> <td class="main">End Date:</td> <td class="main"><script language="javascript">end_date.writeControl(); end_date.dateFormat="yyyy-MM-dd";</script> <font color="red"> * required </font></td> </tr> <!-- Edit - event title --> <tr> <td class="main" rowspan="1" valign="top" nowrap="nowrap">Title:</td> <td class="main"><img src="[URL]http://zentestcart.overthehillweb.com/includes/languages/english/images/icon.gif[/URL]" border="0" alt="English" title=" English "> <input type="text" name="title[1]" value="My Test Event" size="50" /> <font color="red"> * required </font> </td> </tr> <!-- Edit - event description --> <tr> <td class="main" rowspan="1" valign="top" nowrap="nowrap">Details:</td> <td class="main"><img src="[URL]http://zentestcart.overthehillweb.com/includes/languages/english/images/icon.gif[/URL]" border="0" alt="English" title=" English "> <textarea name="description[1]" wrap="soft" cols="80%" rows="6">Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</textarea></td> </tr> <!-- Edit - event manufacturer or product links --> <!-- Edit - event links dropdowns--> <tr> <td colspan="2"> <table border="0" width="100%" cellspacing="0" cellpadding="2" class="columnLeft"> <tr> <td colspan="3" class="main"><b>Store Link:</b> <font class="smalltext">(link to a specific Manufacturer, Category, current or upcoming Product )</font></td> </tr> <tr> <td width="33%" align="center"> <!-- bof manufacturers --> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="left" class="menuBoxHeading"> Manufacturer: </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="left" class="menuBoxContent"><select name="manufacturers_id" id="manufacturers_id_sel" onChange="submit();"><option value="-1">No Manufacturer</option><option value="6">Canon</option><option value="4">Fox</option><option value="8">GT Interactive</option><option value="9">Hewlett Packard</option><option value="5">Logitech</option><option value="1">Matrox</option><option value="2">Microsoft</option><option value="7">Sierra</option><option value="3">Warner</option></select></td> </tr> </table> <!-- eof manufacturers --> </td> <td width="33%" align="center"> <!-- bof categories --> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="left" class="menuBoxHeading"> Category: </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="left" class="menuBoxContent"><select rel="dropdown" name="cPath" onChange="document.getElementById('manufacturers_id_sel').value = ''; submit();"> <option value="0">Top</option> <option value="1">Hardware </option> <option value="17"> CDROM Drives </option> <option value="4"> Graphics Cards </option> <option value="8"> Keyboards </option> <option value="16"> Memory </option> <option value="9"> Mice </option> <option value="6"> Monitors </option> <option value="5"> Printers </option> <option value="7"> Speakers </option> <option value="2">Software </option> <option value="19"> Action </option> <option value="18"> Simulation </option> <option value="20"> Strategy </option> <option value="3">DVD Movies </option> <option value="10"> Action </option> <option value="13"> Cartoons </option> <option value="12"> Comedy </option> <option value="15"> Drama </option> <option value="11"> Science Fiction </option> <option value="14"> Thriller </option> <option value="21">Gift Certificates </option> <option value="22">Big Linked </option> <option value="23">Test Examples </option> <option value="28">Test 10% </option> <option value="25">Test 10% by Attrib </option> <option value="24">Free Call Stuff </option> <option value="33">A Top Level Cat </option> <option value="34"> SubLevel 2 A </option> <option value="40"> Sub Sub Cat 2A1 </option> <option value="43"> Sub Sub Cat 2A2 </option> <option value="35"> SubLevel 2 B </option> <option value="37"> Sub Sub Cat 2B1 </option> <option value="38"> Sub Sub Cat 2B2 </option> <option value="39"> Sub Sub Cat 2B3 </option> <option value="36"> SubLevel 2 C </option> <option value="41"> Sub Sub Cat 2C1 </option> <option value="44"> Sub Sub Cat 2C2 </option> <option value="42"> Sub Sub Cat 2C3 </option> <option value="48">Sale Percentage </option> <option value="45"> 10% off </option> <option value="47"> 10% off Attrib </option> <option value="31"> 10% off Skip </option> <option value="32"> 10% off Price </option> <option value="49">Sale Deduction </option> <option value="27"> $5.00 off </option> <option value="52"> $5.00 off Skip </option> <option value="50">Sale New Price </option> <option value="46"> Set $100 </option> <option value="51"> Set $100 Skip </option> <option value="53">Big Unlinked </option> <option value="54">New v1.2 </option> <option value="56"> Attributes </option> <option value="55"> Discount Qty </option> <option value="60"> Downloads </option> <option value="57"> Text Pricing </option> <option value="61"> Real </option> <option value="58"> Real Sale </option> <option value="62">Music </option> <option value="63">Documents </option> <option value="64">Mixed Product Types </option> </select> </td> </tr> </table> <!-- eof categories --> </td> <td width="33%" align="center" valign="top"> <!-- bof products --> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="left" class="menuBoxHeading"> Product: </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="left" class="menuBoxContent"><select rel="dropdown" name="products_id" onChange="document.getElementById('manufacturers_id_sel').value = ''; submit();"> <option value="" selected="selected"></option> <option value="25">Microsoft Internet Keyboard PS/2</option> </select> </td> </tr> </table> <!-- eof products --> </td></tr><tr><td colspan="3" border="1"> <!-- bof upcoming products --> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="center" class="menuBoxHeading"> Upcoming Products: </td> </tr> </table> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="left" class="menuBoxContent"><select rel="dropdown" name="upcoming" onChange="document.getElementById('manufacturers_id_sel').value = ''; submit();"> <option value=""></option> <option value="34">A Bug's Life "Multi Pak" Special 2003 Collectors Edition | expected: 2005-02-21</option> <option value="16">Courage Under Fire Linked | expected: 2008-02-21</option> <option value="40">A Call for Price Product | expected: 2008-02-21</option> <option value="174">A Call No Price | expected: 2008-02-21</option> </select> </td> </tr> </table> <!-- eof upcoming products --> </td> </tr> <tr> <td colspan="3" class="smalltext"> Upcoming Products Note: <b>Start Date</b> field will be set to "products_date_available".</td> </tr> <tr> <td colspan="3" align="left" height="24" bgcolor="#DDE0E6" class="main"><b>Current Store link: <a href=http://zentestcart.overthehillweb.com/index.php?main_page=index&cPath=8 target=_blank>Keyboards</a><input type="hidden" name="ZC_link" value="<a href=http://zentestcart.overthehillweb.com/index.php?main_page=index&cPath=8 target=_blank>Keyboards</a>" /></b></td> </tr> </table> </td> </tr> <!-- Edit - event additional links --> <tr border="1" > <td class="main" nowrap="nowrap" valign="top">Additional Link:</td> <td class="main"><input type="text" name="ADDL_link" size="60" /><br /><font class="smalltext">eg.: [URL="http://www.mysite.com/event_page.html"]www.mysite.com/event_page.html[/URL] (no [url]http://,[/url] no [URL]https://)</font></td[/URL]> </tr> <!-- Edit - event image --> <tr> <td class="main" nowrap="nowrap">Event Image:</td> <td class="main"> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="main"> <input type="file" name="event_image" size="50" /><input type="hidden" name="event_previous_image" value="DrunkChicken1.jpg" /></td><td class="main">DrunkChicken1.jpg </td><td class="main"><img src="[URL]http://zentestcart.overthehillweb.com/images/events_images/DrunkChicken1.jpg[/URL]" border="0" alt="My Test Event" title=" My Test Event " align="right" hspace="2" vspace="2"></td><td class="main">No Image: <input type="checkbox" name="no_image" /></td> </tr> </table> </td> </tr> </table> </td> </tr> <!-- Edit - buttons row --> <tr> <td> <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" align="right"> <a href="[URL]http://zentestcart.overthehillweb.com/MYSUPERSECRETADMINFOLDER/events_manager.php"><img[/URL] src="includes/languages/english/images/buttons/button_back.gif" border="0" alt="Back" title=" Back "></a> <a href="[URL]http://zentestcart.overthehillweb.com/MYSUPERSECRETADMINFOLDER/events_manager.php?&eID=1&action=delete_event"><img[/URL] src="includes/languages/english/images/buttons/button_delete.gif" border="0" alt="Delete" title=" Delete "></a> <input type="image" src="includes/languages/english/images/buttons/button_preview.gif" border="0" alt="Preview" title=" Preview " name="preview"> </td> </tr> </table> </td> </form> </tr> </table> <!-- Edit - button processing --> </table> <!-- eof Events Table --> ```LaCamus:
I can add anything and everything and delete the link. If you could, please, got to admin and edit an event, then right click the page, view source, copy that and send it to me. I want to make sure my changes made it to your output.
Editing an event:
```
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Totally Zenned
LaCamus:
I can add anything and everything and delete the link. If you could, please, got to admin and edit an event, then right click the page, view source, copy that and send it to me. I want to make sure my changes made it to your output.
**Adding an event:
**```
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
New Zenner
dw08gm:
I really do appreciate your comments and criticisms and hope that I am not responding in too harsh a fashion as to drive you away.
Sunday, when I am back on my main pc, I hope to properly address all of these issues, but for the moment I am using a win8 laptop that drives me half-crazy with the things it makes me endure.
I have some time tonight (friday, I know, what a sad life I lead) and plan on getting to the bottom of the link selection issue. I can knock out those other additions I was talking about also. Would you like me to move forward with this? If you can't give me a file type list at the moment I can start with this and it could be altered later if need be:
IMAGE_FILE_TYPES .gif .jpeg .jpg .png (would show themselves, these are supported by all browsers, .bmp?)
OTHER_FILE_TYPES .pdf .doc .docx .rtf .txt .htm .html (would show a doc image "click to open")
Let me know,
Rus
Totally Zenned
LaCamus:
I have some time tonight (friday, I know, what a sad life I lead) and plan on getting to the bottom of the link selection issue. I can knock out those other additions I was talking about also. Would you like me to move forward with this? If you can't give me a file type list at the moment I can start with this and it could be altered later if need be:
IMAGE_FILE_TYPES .gif .jpeg .jpg .png (would show themselves, these are supported by all browsers, .bmp?)
OTHER_FILE_TYPES .pdf .doc .docx .rtf .txt .htm .html (would show a doc image "click to open")Let me know,
Rus
Here's my three cents:
To dw08gm's point, events may need to include downloadable attachments such as informational flyers, posters, maps, directions, etc..
It makes logical sense that this module needs to be expanded to provide options for event attachments that can be downloaded by the site visitor..
The image upload function should include admin configurable resizing options which work with built in Zen Cart functions as much as possible such as the option to have images resize proportionally (an admin configurable option which a shop owner can turn on or off in the admin)
The image upload feature needs to be flexible enough that IF a shopowner decides NOT use the image re-sizing functions they can choose not to (do not activate this feature at all). However, IF a shopowner turns on the re-sizing feature, perhaps its NOT a bad idea for it to include an on-screen prompt as you suggested so that shopowners are still given the option to elect to not resize images on a case by case basis. The resize on-screen prompt should probably inform them of the image dimensions and filesize. (so they KNOW before they just say no)
Most of the filetypes you listed covers the most common filetypes I see used as attachment to apps in this class with the exception of .html. .html docs should probably not be included as they can introduce a set of issues of their own.. Might be best to stick to standard filetypes..
NO BMPS!!!!!:laugh: NO ONE should be using BMPs on ANY modern (or old) website..
So that's my grocery list.. :laugh:
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
New Zenner
OK, just for an update...I think we've (Diva and I) have come to conclusion that the shop link creation is working. Based on point number 7 in my first post (http://www.zen-cart.com/showthread.php?76804-Event-Calendar&p=1194688#post1194688) I had changed the manufacturer to show the prior selection. I didn't do it for categories and products because they were using the zen carts select box creation function and I was unfamiliar with it (and didn't want to mess anything up). I think the code as it is right now (my version) is working how the initial coder intended, I can only base this on the fact that they had a different process for the manufacturers than the cats & prods and the way the queries were written. If you click on any of them the link actually changes (watch it) and is never overridden by the manufacturer (even on edits). The only way to see products in the drop down is to select a manufacturer or a sub category that actually has active products under them. Remember, I did not write those queries or the initial processes on the drop downs. I think at the very least a little more description on the create/edit page could help steer users to the correct link creation.
Anyway, now that I feel comfortable with the code, what I will do is go in and change this to be more cohesive... i.e. enhance the description, show the last selected option, and add a checkbox instead of a "No Manufacter" option to completely delete the link. It may also be nice to see products when you select a top category, not just sub categories.
I will also (attempt to) add configuration variables under the admin configuration drop-down to allow users to check the max width of uploaded images (or to turn the checking off), to check the file types loaded (or to turn the checking off). If width checking is on it will prompt (with a checkbox) on the preview screen to go ahead and resize or not...and to resize it to what (defaulted to the configuration variable setting).
I'll let you know when I have more.
Thanks
Rus
Totally Zenned
LaCamus:
OK, just for an update...I think we've (Diva and I) have come to conclusion that the shop link creation is working. Based on point number 7 in my first post (http://www.zen-cart.com/showthread.php?76804-Event-Calendar&p=1194688#post1194688) I had changed the manufacturer to show the prior selection. I didn't do it for categories and products because they were using the zen carts select box creation function and I was unfamiliar with it (and didn't want to mess anything up). I think the code as it is right now (my version) is working how the initial coder intended, I can only base this on the fact that they had a different process for the manufacturers than the cats & prods and the way the queries were written. If you click on any of them the link actually changes (watch it) and is never overridden by the manufacturer (even on edits). The only way to see products in the drop down is to select a manufacturer or a sub category that actually has active products under them. Remember, I did not write those queries or the initial processes on the drop downs. I think at the very least a little more description on the create/edit page could help steer users to the correct link creation.
Anyway, now that I feel comfortable with the code, what I will do is go in and change this to be more cohesive... i.e. enhance the description, show the last selected option, and add a checkbox instead of a "No Manufacter" option to completely delete the link. It may also be nice to see products when you select a top category, not just sub categories.
I will also (attempt to) add configuration variables under the admin configuration drop-down to allow users to check the max width of uploaded images (or to turn the checking off), to check the file types loaded (or to turn the checking off). If width checking is on it will prompt (with a checkbox) on the preview screen to go ahead and resize or not...and to resize it to what (defaulted to the configuration variable setting).
I'll let you know when I have more.
Thanks
Rus
So I see what is happening now, and for me it's not working as it should for a variety of reasons..
I would expect that when I select a category that has products in it, that the products list will display the products for the category I selected.. THAT is not what is happening for me.. I cannot select products until I select a manufacturer.. Once I select a manufacturer, then I am provided with products in the products dropdown and THEN I can add products.. STILL can't link a category..
The ENTIRE interface is confusing and doesn't work as it APPEARS it should.. so for me I still mark this in the "not working" category.. Will wait to see if your new code address this all..
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
New Zenner
DivaVocals:
.. STILL can't link a category..
The ENTIRE interface is confusing and doesn't work as it APPEARS it should.. so for me I still mark this in the "not working" category.. Will wait to see if your new code address this all..
It has to be a sub-category that has items in it. Many of the categories on your demo site do not have items in them...I had to select a few before I found some.
New Zenner
LaCamus:
It has to be a sub-category that has items in it. Many of the categories on your demo site do not have items in them...I had to select a few before I found some.
check that, you can create a link for any category other than "top" but if you want to select a product then it has to be a sub-cat with products under it.
Totally Zenned
LaCamus:
check that, you can create a link for any category other than "top" but if you want to select a product then it has to be a sub-cat with products under it.
I know.. this is standard Zen Cart behavior.. If I select a category, (NO manufacturer selected) the product dropdown NEVER appears.. I CAN select a manufacturer and see products linked to that manufacturer appear..
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
New Zenner
DivaVocals:
I know.. this is standard Zen Cart behavior.. If I select a category, (NO manufacturer selected) the product dropdown NEVER appears.. I CAN select a manufacturer and see products linked to that manufacturer appear..
OK, found out why...it is FireFox. IE9 and Chrome will except a blank value to a select option that does not exist...FireFox will not. My fault for not checking FireFox, spank spank. I think this is the first time I have ever had something work in IE + Chrome and not work in FireFox. Live and learn.
Well anyway here's a quick fix...
In admin/includes/events_manager_drop_dns.php (my version) where you see:
//** rus: start
$select_box .= '<option value="-1">No Manufacturer</option>';
...make it...
//** rus: start
$select_box .= '<option value=""></option>';
$select_box .= '<option value="-1">No Manufacturer</option>';
I am currently in the process of changing this...i.e. a checkbox for removing the link, so the "No Manufacturer" option is going away (probably by morning). This new functionality will be cleaner.
Thanks Diva for for helping me get to the bottom if this,
Rus
Totally Zenned
LaCamus:
OK, found out why...it is FireFox. IE9 and Chrome will except a blank value to a select option that does not exist...FireFox will not. My fault for not checking FireFox, spank spank. I think this is the first time I have ever had something work in IE + Chrome and not work in FireFox. Live and learn.
Well anyway here's a quick fix...
In admin/includes/events_manager_drop_dns.php (my version) where you see:
//** rus: start
$select_box .= '<option value="-1">No Manufacturer</option>';
>
> ...make it...
> ```
//** rus: start
$select_box .= '<option value=""></option>';
$select_box .= '<option value="-1">No Manufacturer</option>';
I am currently in the process of changing this...i.e. a checkbox for removing the link, so the "No Manufacturer" option is going away (probably by morning). This new functionality will be cleaner.
Thanks Diva for for helping me get to the bottom if this,
Rus
de nada!!:smile:
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Totally Zenned
Well folks, nothing broke in my testing, so I think we are good to go.
I have bundled all the suggestions put forward to date and am in the process of updating the readme with more stuff about file sizes, mod operation and a how to add events via csv. Hopefully this will be completed tonight and a complete fileset posted here shortly afterwards for final appraisal.
If you have no objections, I will strip out all non-critical comments and obsolete code from the files (to make for a clean fresh start) and acknowledge your efforts via the readme.
Thanks again for all of your help. Cheers :clap:
Totally Zenned
HOW TO UPLOAD EVENTS VIA CSV.
This guide outlines how to export, edit and import events into the events_calendar table of your store database.
I primarily use this to upload en masse recurring events (eg public holidays) several years in advance.
The guide was written primarily for myself using current versions of XAMPP (with phpmyadmin) and Open Office software.
Warning: The slightest mistake or error could render your database useless, whereupon your only recourse may be to import your database backup.
Backup your zencart database.
Open phpmyadmin and navigate to your store and the events_calendar table (hereinafter "ec-table").
Export ec-table as a csv file and save to your computer.Open saved CSV with Open Office Calc with the following settings:
Set Character Set to Unicode (UTF-8)
Set Language to English (USA)
Set From Row to 1Click Separator Options and untick all options.
Set Comma as the field delimiter.
Set Double Quote as the text delimiter.Leave Other Options unticked
Edit CSV file
Warning: The CSV file may not contain column headings.
Delete the entire contents of column A (auto-increment), but do not delete column A (since sql will restore auto-increment).
Cut and Paste entire columns of the older version of ec-table to match the column order of the current version of ec-table.
Edit/Add/Delete any rows to suit. (Note: all saved rows will be added. Duplications may occur if ec-table is not cleaned of content.)
Pay close attention to the format of all cells.
Ensure date entries are formatted as 'YYYY-MM-DD.
Re-sort row order as desired (will be conveyed to db).
Save CSV file.In phpmyadmin, navigate to ec-table.
Under Operations, Drop ec-table.
(Note: The dropping of ec-table is primarily to reset the auto-increment. There are less destructive ways to do this, but how?)In your zencart admin, copy the following sql to Admin > Tools > Install SQL Patches
CREATE TABLE events_calendar (event_id int(4) NOT NULL auto_increment, language_id int(11) NOT NULL default '1', start_date date NOT NULL default '0000-00-00', end_date varchar(20) default NULL, title varchar(255) default NULL, event_image varchar(64) default NULL, ZC_link varchar(255) default NULL, ADDL_link varchar(255) default NULL, description text, date_added datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (event_id,language_id));
In phpmyadmin, navigate to ec-table.
Under Import, browse to CSV file, and apply the following settings:Set Character set of the file: utf-8
Set Columns separated with: , (comma)
Set Columns enclosed with: " (double quotation)
Set Columns escaped with: \ (backslash)
Set Lines terminated with: autoClick Go to complete.
In your zencart admin, check and test the data.
In your zencart store, check and test events calendar.If everything is OK, then you're done.
For your perusal.
AFAIK The only thing I need is a way to fix the auto-increment without dropping the entire DB table.
ps IIRC The event ID field is currently set to 3 digits, but may be increased to 4 or more if your number of events could exceed 999.
Cheers
Totally Zenned
dw08gm:
Well folks, nothing broke in my testing, so I think we are good to go.
I have bundled all the suggestions put forward to date and am in the process of updating the readme with more stuff about file sizes, mod operation and a how to add events via csv. Hopefully this will be completed tonight and a complete fileset posted here shortly afterwards for final appraisal.
If you have no objections, I will strip out all non-critical comments and obsolete code from the files (to make for a clean fresh start) and acknowledge your efforts via the readme.
Thanks again for all of your help. Cheers :clap:I would hold on for just a tad bit.. Rus' was working on some improvements this weekend to the changes he already made, and so some of his modified code may have changed.
Hey Rus.. are ya out there???:laugh:
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
New Zenner
DivaVocals:
I would hold on for just a tad bit.. Rus' was working on some improvements this weekend to the changes he already made, and so some of his modified code may have changed.
Hey Rus.. are ya out there???:laugh:
I'm real close...ran into a couple of problems. Trust me though, it looks clean, I think both of you will like the changes.
dw08gm,
No problem on the remarks, they were just for your benefit, strip away. Diva's right, some of my changes have changed...namely all the file resizing stuff, you can choose now to turn it completely off. Right now there are 6 to 8 files changed and if I choose to add a few more things tonight (like the config via admin) there may be some database updates too.
Thanks,
Rus
Totally Zenned
LaCamus:
I'm real close...ran into a couple of problems. Trust me though, it looks clean, I think both of you will like the changes.
dw08gm,
No problem on the remarks, they were just for your benefit, strip away. Diva's right, some of my changes have changed...namely all the file resizing stuff, you can choose now to turn it completely off. Right now there are 6 to 8 files changed and if I choose to add a few more things tonight (like the config via admin) there may be some database updates too.
Thanks,
Rus
Strongly suggest adding in admin config options where appropriate.. I am not a fan of editing settings directly in files.. Novice shop owners usually run into trouble with these kinds of edits.. (Another reason why I advocated for including the already modified tpl_main_page file as a part of the install package)
My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.
Totally Zenned
Rus
Happy to wait for further improvements.
I am wondering if its not too much to ask whether you could look into this:
When a particular calendar date has only one event, clicking that date in calendar will take you directly to that event, rather than to the event list for that date.
I suspect the solution lies in tpl_events_calendar_default and will look something like:
if($ev->RecordCount() > 1){
show all events for date
} else {
show single event }
tied with this:
if($_GET['_day'])
{
$ev = $db->Execute("select event_id from ".TABLE_EVENTS_CALENDAR." where DAYOFMONTH(start_date)= '" . $_day . "' and MONTH(start_date) = '" . $_month . "' and YEAR(start_date) = '" . $_year . "' AND language_id = '" . $_SESSION['languages_id'] . "'");
if($ev->RecordCount() > 0)
{
$single_event = true;
$select_event = $ev->fields['event_id'];
}
}
but so far I have been unable to get my head around what needs to be done.
Cheers
New Zenner
dw08gm:
Rus
Happy to wait for further improvements.
I am wondering if its not too much to ask whether you could look into this:
When a particular calendar date has only one event, clicking that date in calendar will take you directly to that event, rather than to the event list for that date.
Cheers
Sure, not a problem....just ending a long session right now. Will look into it soon. I know there is a setting for this in zen carts for products...when you click a category that has only 1 item go straight to that item. It is really a feature. Ok wait, little sleepy <smile>, you want this feature...right, ok, yeah that would be nice. We can make it a setting that can be changed.
Rus
New Zenner
OK, this is a test release of the mods I've been working on. I don't have a readme for it yet, but it is really a cleaner version of the previous mods.
I made a few more changes:
Defaulting the second date (end) to the 1st (start) when you forget to put it in. Also will copy other date if empty (1st to 2nd, 2nd to 1st), onblur.
All the link build select drop downs should stay highlighted now. Only 1 drop down will have a highlight...the one the link is built from. If there is no link (or you delete it) then all drop downs go to the top (blank).
Link build section has delete radio button and lets you know that it was deleted (or updated) now. Will also keep the value when moving back and forth from preview and edit.
Can upload (and view in store front) images and docs now...for images it only supports png, jpg, and gif, if someone needs another type let me know and I will make the change. When you upload a doc type it shows a default image...you can change the image (just use the same file name) I have there now if you don't like my generic one.
Don't forget to update the image manipulator under your_admin/includes/classes, a made a few changes to it.
Had to change the .htaccess file in the events image directory...of course that's for apache (there is a copy in the zip), if you are serving from windows those doc types below are probably already good to go.
Resizing on images is on the preview page now, works pretty good, gives warning if over max(s) (now supports a height max too), then you can click to change, allows you to go above the max parameters, they are just used as a guide for the admin user. You can go back and resize the image even after you've saved an event (update mode).
You can turn off the image resizing (see defines below) if you want. Leaving the maxes set and turning EVENTS_FILE_RESIZE off (false) takes out the file resizing fields but will resize the image in the IMG tag only...only on the admin side, I left the image resizing up to you (I know you were planning some css changes on the front).
DEFINE vars are currently in:
(admin side) your_admin\includes\languages\english\extra_definitions\events_manager.php
define(EVENTS_FILE_MAX_WIDTH, '800'); //** rus.02: for max image width in px, check on uploads, change on review
define(EVENTS_FILE_MAX_HEIGHT,'600'); //** rus.02: for max image height in px, check on uploads, change on review
define(EVENTS_FILE_RESIZE, true); //** rus.02: for image resizing, set to false to do/show no resizing
define(EVENTS_IMAGE_EXTS, '.jpg .jpeg .png .gif'); //** rus.02: image types allowed
define(EVENTS_OTHER_EXTS, '.doc .docx .pdf .rtf .txt'); //** rus.02: other file types allowed
(store side) includes\languages\english\extra_definitions\your_template\events_calendar_include_defines.php
define(EVENTS_IMAGE_EXTS, '.jpg .jpeg .png .gif'); //** rus.02: image types allowed
define(EVENTS_OTHER_EXTS, '.doc .docx .pdf .rtf .txt'); //** rus.02: other file types allowed
Question: Why are defines separate? One set for front one set for back...did I miss something? Is there a shared define file between the two?
Things I still need to do:
I would like to get the 2nd date to auto fill after spiffy calendar, it is an old script and doesn't make it easy to piggy back onchange/onblur functions...I can do it but it will be tricky, something for a later date.
Would like to move above defines into admin/configure menu (thinking I can have that done this week).
Have to move some of my text into the language define files (this week).
I made some other changes, I just can't remember right now (tired)...if I made a change, it is REMarked.
Should be able to make that other change for you...straight to single events on given date (this week).
The functionality should be all there, just cosmetics, testing from others would be greatly appreciated.
Thanks everyone,
Rus
Tell staff why this post should be reviewed.