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.
The tableless layout I created is no real big deal.. It simply uses one of the fluid CSS layouts from the CSS Play website to "convert" the main page table to a tableless layout.. This part of my code will not be of interest to Raymond for what he is doing as it is just a 3-column fluid layout which needs a LOT more work to be responsive.. I don't intend to invest any time into the exercise of making this template responsive as what Raymond has contributed already does this..
The important/relevant part of the code I shared with Raymond is the part which calculates all three columns based on the default values entered in the admin. It then explicitly applies a percentage to that value. (solving the issue where you MUST enter px in the admin or the column width doesn't work) Now while my code explicitly converts the value to a percentage, it might give Raymond an isdea for how to get the code to support either "px" or "%"..
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.
I used the existing admin configs to input column width values in four places qualified as percentages eg "20%". That was the easy part. The rest had to be done with css.
Right.. I ran into the same/similar issue Raymond is discovering now.. So I simplified what I was doing so that I didn't need to do anything more than enter the values in the admin, and let the code do the rest.. After that I could use whatever CSS I needed do anything else..
Last edited by DivaVocals; 22 Oct 2013 at 07:43 PM.
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.
niccol;s code is very similar to mine.
niccol uses floatval where I am using preg_replace
I originally set out to remove the px from the admin configuration while doing so I noticed if entered without the px extension it had no effect anyway and thought the ADMINS - DEVELOPERS of ZC would reply as too if this was intentional or not.
Anyway, niccol;s method and mine seem to both work as intended and thank you for that Crystal.
You're welcome.. Happy to share with you..
After I saw your description of what you were trying to do, and the issue you were running into, it sounded very much like the issue I ran smack into when entering percentage values for the columns AND the SIDEBOXES in the admin.. Which is why I shared in case you found something in the code I had useful..
Looking forward to seeing your next release of the DIY Responsive Template.. I just started creating a new template from scratch using it with (as you know) my FAV starting point template, Barebones.. I had a responsive Barebones template AS SOON as merged the DIY Responsive Template files with Barebones (no other changes).. Simply amazing!!
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.
Amazing will be 2.0
The biggest difference will be cleaner and well commented code.
The next biggest difference will be the ability to use the ZC stock configurations.
I am having a blast testing the different @media query expressions, will help to target specific devices.
The original was rolled out quickly and I received the necessary feedback to make the changes needed (a big part due to the roll out of Anne;s responsive templates). Thank you Anne.