PDA

View Full Version : Enhanced Dynamic MoPics and Images stored in directories



ridexbuilder
05-15-2009, 08:42 AM
A new project_project entry has been added:

Enhanced Dynamic MoPics and Images stored in directories (http://www.oscmax.com/node/286)

This consolidates a lot of the common issues/questions that people have with the use of images.

ridexbuilder
05-18-2009, 04:57 AM
Might be handy for some:
http://www.oscmax.com/blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial (http://www.oscmax.com/forums/../blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial)

ridexbuilder
05-18-2009, 04:20 PM
Wondering if someone could give me a help with the following code snippet.
It's the iterated filenames that's the issue - I'm not au fait with the required syntax. :error:



// BOF Enhanced Dynamic Mopic - ejsolutions
$products_thumb = new upload('products_thumb');
$products_thumb->set_destination(DIR_FS_CATALOG_IMAGES . DYNAMIC_MOPICS_THUMBS_DIR);
if ($products_thumb->parse() && $products_thumb->save()) {
$products_thumb_name = $products_thumb->filename;
} else {
$products_thumb_name = (isset($HTTP_POST_VARS['products_previous_thumb']) ? $HTTP_POST_VARS['products_previous_thumb'] : '');
}
// for ($i=1; $i<MAX_IMAGES_UPLOAD + 1; $i++) {
// $products_mopics[$i] = new upload('products_image' . '_' . $i);
// $products_mopics[$i]->set_destination(DIR_FS_CATALOG_IMAGES . DYNAMIC_MOPICS_THUMBS_DIR);
// if ($products_mopics[$i]->parse() && $products_mopics[$i]->save()) {
// $products_mopics_name[$i] = $products_mopics[$i]->filename;
// } else {
// $products_mopics_name[$i] = (isset($HTTP_POST_VARS['products_previous_mopics']) ? $HTTP_POST_VARS['products_previous_mopics'] : '');
// }
}
// EOF Enhanced Dynamic Mopics
TIA
EJ

ridexbuilder
05-19-2009, 03:50 PM
New Slimbox revision (RC1), with improved instructions, code cleanup and better/clearer descriptions (I hope) in Admin console.
Also includes instruction on changing from Slimbox to Lightbox and small 'tweaks' to Slimbox popup image borders.
Released on my website along with a short Irfanview tutorial.

There's a blog with a step-by-step guide for newbies - accessed either directly from the menus above or from documentation in the Project (see the 1st post of this thread).

michael_s
05-28-2009, 06:26 PM
Just a quick update, this mod has been committed to SVN in the v2.1 branch (slimbox too!). It will be in the next planned release. Great work!

ridexbuilder
06-20-2009, 10:43 AM
Unfortunately there's a file missing from the Slimbox edition of the patch. :error:
referred to in http://www.oscmax.com/forums/oscmax-v2-customization-mods/19183-image-links-broken-new-products.html#post45467 (http://www.oscmax.com/forums/oscmax-v2-customization-mods/19183-image-links-broken-new-products.html#post45467)
This can be retrieved from the 'J' patch, available in the Project section of this board.
I'll try to find time to incorporate the missing file into to the Slimbox patch (and test it out).
Meantime, manually adjust your 'New Products' page as in the post above or grab the file from the J patch at http://www.oscmax.com/project/Enhanced_Dynamic_MoPics (http://www.oscmax.com/forums/../project/Enhanced_Dynamic_MoPics)

[Just can't get the staff these days, eh? :bonk: ]

EJ

ridexbuilder
06-30-2009, 02:24 PM
RC2 Added to the Project, with the missing file.

DrLeadBasedPaint
07-22-2009, 07:36 PM
I noticed that when I create a new item in my OSCMax store that the image does not display when one browses to my store... then I read some about this MoPics.

Folks, excuse me, but I don't understand what this is supposed to do... HECK I don't even know how it works! I've wasted a few hours on it now and I really really really need someone to point me in the right direction.

What I'm trying to do is upload the item using the new product screen in admin... it acts like it's uploading my image, but every time I browse my store, the images are not there at all. HELP!!

ridexbuilder
07-23-2009, 01:05 AM
Folks, excuse me, but I don't understand what this is supposed to do... HECK I don't even know how it works! I've wasted a few hours on it now and I really really really need someone to point me in the right direction.
Read the additional documentation (http://www.oscmax.com/project/Enhanced_Dynamic_MoPics) that I took the time and trouble to write. :poke:

You need to tell us a link to you site, in order to check what your issue is.

EJ

DrLeadBasedPaint
07-23-2009, 02:11 AM
OK. it's at Classified Information Services : (http://shop3.classifiedinfo.net) of course, you will see that for my product, no image is shown, although I have uploaded the image using the new product form... and incidentally, on the confirmation page, the image is visible.

Of course, I have already read the info at the given link. Let me try to explain where the blockage is.... For example:


8 ) Add sample products, uploading the first set of images from thumbs and full-size directories.

I suppose I get the concept of creating thumbnails and separating them into a separate directory. What seems incredibly unclear is how these thumbnails and large images become associated with a product, seeing that the only obvious way to do this is to upload an image for the product via the new product form.

The info on MoPics is sketchy to the point where it seems to me like a basic knowledge of how it works is prerequisite to an understanding of what is written.

So let's suppose I added a new product called "product1." I enter the name, description, price, etc. then want to add an image called product1.jpg. So I go to the bottom of the new form, browse to my image, confirm it in the preview page.... Then what? what do I do to make that image show up in the customer view?

ridexbuilder
07-23-2009, 02:38 AM
Your thumbnail should be in images/thumbs/GGW-H20L_LG.gif - check in File Manager.
If physically there, are you using any protection on the server to prevent images being shown?

The fact that I see the "Other images for this product" box, suggests that my Mopics mod isn't implemented. (If I recall correctly).

You seem to have grasped the fundamentals, though I don't know how I could make my instructions any clearer, if you've read the http://www.oscmax.com/blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial (http://www.oscmax.com/forums/../blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial)
There's no reason to get involved with 'the guts' on the coding if the above is followed - though you are, of course, free to do so.
Which patch are you using - the 'J' one or oscmax_V2.0.2EMwS-RC2.zip (http://www.oscmax.com/forums/../system/files/oscmax_V2.0.2EMwS-RC2.zip) ?
What settings do you have for Dynamic MoPics in the Admin. Console?

DrLeadBasedPaint
07-23-2009, 05:08 AM
Thank you for your response...


Your thumbnail should be in images/thumbs/GGW-H20L_LG.gif - check in File Manager.
If physically there, are you using any protection on the server to prevent images being shown?

OK, we may be on to something.... how would this get into the thumbs directory? I uploaded this using the normal new product form.



The fact that I see the "Other images for this product" box, suggests that my Mopics mod isn't implemented. (If I reacll correctly).

DAWG. I will do the mod, but I'm afraid I don't know what the mod is. I went over to HTTP Error 403 (http://ejsolutions.co.uk/info/Download/) and see
OscMax 2.0.2j Dynamic MoPics Patch (J Edition)is this the mod you are talking about?




You seem to have grasped the fundamentals, though I don't know how I could make my instructions any clearer, if you've read the http://www.oscmax.com/blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial (http://www.oscmax.com/forums/../blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial)

I appreciate the effort you made in the tutorial... somehow I have missed some of the fundamentals of how to use this.



There's no reason to get involved with 'the guts' on the coding if the above is followed - though you are, of course, free to do so.

No, I just want this to work!!!


Which patch are you using - the 'J' one or oscmax_V2.0.2EMwS-RC2.zip (http://www.oscmax.com/forums/../system/files/oscmax_V2.0.2EMwS-RC2.zip) ?

This is how it was when I installed osCMax_v2.0.3


What settings do you have for Dynamic MoPics in the Admin. Console?

Big Image Types jpg,gif,jpeg,tiff,png,bmp Info
Thumbnail Image Types jpg,gif,jpeg,tiff,png,bmp Info
Big Images Directory images_big/
Thumbnail Images Directory thumbs/ Info
Main Thumbnail In "Thumbnail Images Directory" false Info
Extra Image Pattern imagebase_{1}

I don't think I've changed anything here.

Thanks for your helpful advice.

DrLeadBasedPaint
07-23-2009, 05:24 AM
OK, I found this on the main page that looked promising:


Driven by consumer demand... and desire to make using MoPics easier/more versatile.
If only one image is required for a product, then this can be input via the Admin console as normal - called a thumbnail. Optionally, a larger (expanded/full-size) image can also be uploaded at this stage.

So I said, "wow, just what I need."

I downloaded this thing and in the EMwS-Installation.txt file, it says,


oscmax_V2.0.2EMwS Enhanced MoPics with Slimbox (ejsolutions reference) RC1

I wonder what Slimbox is. Maybe I don't have Slimbox and that's why this won't work.


For oscMax v2.0 to 2.0.2
Users of v2.0.2 patches A through J, will need to remove previously run SQL statements
in D-Mopics.sql and compare files from the previous patches to this set.

I have v2.0.3. I do not know if I have anything from A-J. So I don't know if I need to remove any SQL statements.

Functionality
Store fullsize images in images/images_big; store thumbnails (reduced-size) in images/thumbs.
Do the same for additional images for the same product. eg.
widget.jpg 40Kb --> /images/images_big/
widget.jpg 10Kb --> /images/thumbs/
widget_1.jpg 35Kb --> /images/images_big/
widget_1.jpg 9Kb --> /images/thumbs/
widget_2.jpg 37Kb --> /images/images_big/
widget_2.jpg 9.5Kb --> /images/thumbs/

So, does the file name of the image have to be the product name? Is this how the system is supposed to associate images with products? What happens if the product name is significantly longer than "widget." Something just doesn't make sense.

1. Replace all files in the zip with those in your catalog directory.

So I unzip the file, then download the existing files to overwrite what's in the zip file?

2. Check in /catalog/templates/fallback/ *** compare with your own template(s) and adjust the appropriate files ***

ah ha! What's going on with this templates/fallback... and how does that interact with the new product page?

DrLeadBasedPaint
07-23-2009, 05:40 AM
OK, how about this....

pretend that you were me (although I know you are much smarter ;-)

I have this product named " LG Electronics GGW-H20L LightScribe 6X Blu-Ray & 3X HD DVD-ROM"

I have an image of this product called, "GGW-H20L_LG.gif"

What would I have to do to make this image show up for that product?

DrLeadBasedPaint
07-23-2009, 06:15 AM
OK. Good news.... I got this thing to work!! I took the risk and installed the oscmax_V2.0.2EMwS-RC1, which did the job. Now the new product page actually has a place to upload the thumbnail and large image.

See, I'm not as stupid as I thought!!

Thanks for your help.

ridexbuilder
07-23-2009, 06:24 AM
No idea what your issue is... are you of a suitable disposition for this type of work? :p

Go through the guide step-by-step. Some knowledge is required - setting up mySQL, using cPanel/h-sphere to access your files etc. [In fact, I need to do a 'fresh' install at some point today, so I will be doing the same thing].

Did you actually look at my demo site to see Slimbox in operation? [The expanded images methodology].

Ignore references to any previously applied patches - for the benefit of others who might have been following the thread - this is a new setup, so obviously(?) you won't have the patches.

Name the pics whatever you like - I'll suggest matching to product model number, as I do for everyone but frequently they don't listen.

Most important thing... slow down, chill. Work through things and read, read, read ;)



EJ

ridexbuilder
07-23-2009, 06:30 AM
Suggestion: reduce the size of your thumbnails to closely match those of your chosen size on the product info page. This will realise the benefit of reduced bandwidth and speedier page rendition. [I have a short tutorial on creating thumbnails on my website - geared specifically for oscMax].

eg. your 1st test image shows the following (right-click, Properties):
400px × 302px (scaled to 150px × 113px)

The 150px is defined in the Admin Console, Images.
Images Large should be the full size ;)

DrLeadBasedPaint
07-23-2009, 01:38 PM
Hi ridex!

I don't know if you missed it, but earlier today I said,

"OK. Good news.... I got this thing to work!! I took the risk and installed the oscmax_V2.0.2EMwS-RC1, which did the job. Now the new product page actually has a place to upload the thumbnail and large image."

i.e. I got it working!

Yes, I do need to chill, and while I may not be suited for this line of work, I've been doing it for an awful long time....

Thanks for all you do~!

Dr. Paint

ridexbuilder
07-23-2009, 02:44 PM
Last edited by ridexbuilder; Today at 06:25 AM. Reason: Glad to hear you're getting there, in the intervening time :-)

[Comment was said 'tongue in cheek', I'm world's worst for 'ratty' days ;-)]

ridexbuilder
08-17-2009, 09:33 AM
Recent use of EasyPopulate has shown that prefixing images with 'images_big/' is not required.

ridexbuilder
08-19-2009, 09:15 AM
As sent direct to one of my email accounts, by "kristijan":


I solve this:

To do:
Need help with syntax for adding thumbs filename into the databa<x>se along with the rest of the array.
This will remove the above limitation.

If you want solution please replay. I can send you working copy for file: categories.phpNot the way to contribute to the community.
:bonk:

ridexbuilder
11-01-2009, 01:27 AM
For folks who may be subscribed to this thread, please see the new thread "... Status Update (http://www.oscmax.com/forums/oscmax-v2-customization-mods/20869-enhanced-dynamic-mopics-status-update.html)" - I couldn't find this one at the time. D'oh! :bonk:

ridexbuilder
11-01-2009, 01:17 PM
Release added:
http://www.oscmax.com/projects/release/enhanced_dynamic_mopics_and_images_stored_director ies_203176rc1 (http://www.oscmax.com/forums/../projects/release/enhanced_dynamic_mopics_and_images_stored_director ies_203176rc1)

ridexbuilder
11-01-2009, 05:09 PM
RC2 released, with code tidied up, small bug fix and additional functionality.
Now possible to limit the size of the large (popup) image during upload - saving on disc space and bandwidth, as well as speed of page loads. Handy for those clients who forget to resize images, prior to uploading. :rolleyes:
http://www.oscmax.com/projects/release/enhanced_dynamic_mopics_and_images_stored_director ies_203176rc2_0

ridexbuilder
11-02-2009, 02:44 AM
Wondering if someone could give me a help with the following code snippet.....


No longer required. :)

ridexbuilder
11-02-2009, 03:23 PM
Bug fix released, now RC3:
Enhanced Dynamic MoPics and Images stored in directories - osCMax - osCommerce Maximized (http://www.oscmax.com/project/Enhanced_Dynamic_MoPics)

ridexbuilder
11-03-2009, 01:43 AM
Just discovered:
The image filename extension is case sensitive. :confused: Lower case works fine, upper case doesn't display slimbox popup.
Any assistance greatly appreciated. It must be either in the Slimbox code itself, or product_info.tpl.php and other associated files.
I'll try to find time later to figure it out.
:time:

Workaround: Add JPG, PNG, GIF to Image types in Admin, Dynamic MoPics - may as well remove TIF/BMP (crazy to use them)

ridexbuilder
11-03-2009, 02:34 PM
Missing functionality spotted by 'astonishedman' - new release (RC4) added to fix cross-sell products.

ridexbuilder
11-08-2009, 10:51 AM
No panic here, just a bit of background information.

An irritating bug found:
Thumbnail creation using oscThumb is supposed to be able to be configured easily through a series of inline directives, the cache directory being one of them. In the application used here, a cached file isn't actually needed.

$phpThumb->setParameter('config_cache_directory', null );
I've tried directing to a specific cache directory as well as turning caching off - to no avail.


Workaround:
Quite simple and something which is advisable/recommended in any case. The admin directory should have read only permissions. That sorts it out. :) Of course in a live environment this should be done anyway - it was only on a development site that I discovered the bug.

May be relevant for people wishing to use oscThumb elsewhere in the system.

EJ

gameznet
11-17-2009, 03:56 AM
I hope this is the right place to post this,
I was Just checking my servers error logs and there are hundreds of references to a missing image file in "/catalog/templates/fallback/images/box_header.jpg"
it is called by /catalog/templates/fallback/dynamic_mopics.css

I know its not major but it makes it harder to look at my error logs so can we get the image added to the next update for mopics?
Other than that it is working Great for me :)

ridexbuilder
11-17-2009, 04:07 AM
Looking now...
Hmm bit unsure as to how that one crept in. It's intended for use where you have a stylised header to each of the boxes. If unused then...


background-image: url('images/box_header.jpg');
should be replaced with

/* background-image: url('images/box_header.jpg'); */
in all instances within dynamic_mopics.css

I'll grab some grub and have a think ;)

ridexbuilder
11-19-2009, 09:06 AM
New ALPHA (http://www.oscmax.com/system/files/oscmax_V2.0.xEMRC5a1.zip) release available, for developers/testers. Not advisable to be used in a live/production environment and should be considered as a preview only.
Highlights:


Product Preview shows main image and any MoPics images (very similar to how the page will look to the end user) with Slimbox image popups.
Product input page rearranged to put price related items together.
Model number moved up into a more prominent position.
Dimensions grouped together, using less screen 'real estate'.

Donations to the usual place. :rolleyes: Though I guess 'Rep Power' is better than nothing. :p

ridexbuilder
11-19-2009, 09:21 AM
:scratchchin: Following a reply in a recent thread (albeit slightly out of context)


...or diverge from osCommerce so much as to break compatibility with the addons for osCommerce

One wonders whether I should stop further 'enhancements' and backport to osCommerce 2.2 - would certainly benefit one of my clients.
:suicide:

michael_s
11-19-2009, 09:31 AM
No need to stop developing mods. They are mods, not core code. If someone decides to add this feature, it is their decision and has no bearing on the project as a whole.

No need to backport either. If it works in osCMax, it will work in osC with very little change. Remember that your mod is built to work with osCommerce + bts + dynamic mopics. As long as it works with that combo, there is no point in backporting, as those are required for the mod to work.

ridexbuilder
11-19-2009, 03:11 PM
Product Preview of images stored in subdirectories now tested - moved to beta (http://www.oscmax.com/system/files/oscmax_V2.0.xEMRC5b1.zip) status.
USE WITH CAUTION - on a test/development site first!

adatole
12-14-2009, 02:30 PM
I just can't seem to get Dynamic MoPics to work on my site. I've just loaded a fresh copy of 2.0.4, then the RC3 patch. Applied all database mods, etc. images, images_big and thumbs are all set to 777. I've got blahblah.jpg and blahblah_1.jpg in both images_big and thumbs (just in case). But still no love.

Promo Custom Branding : (http://www.promocustombranding.com/catalog/)

This is hosted on bluehost, if it makes a difference.

ANY insight is welcome!

ridexbuilder
12-16-2009, 08:58 AM
Take this product:
Wood Memo Pad Holder With Pen
/catalog/images/thumbs/pen-paper.jpg
That image is not a thumbnail - 500px × 333px (scaled to 100px × 66px)
It should be stored in /catalog/images/images_big/pen-paper.jpg with a resized 100x66px thumbnail stored in /catalog/images/thumbs/pen-paper.jpg

For a much easier time of it, grab the latest release (beta one). It'll auto-generate the images. Just go in and set the image sizes in Admin., Images, then upload your original photo, it'll do the rest. A perfect time to do this, given the few products already uploaded.

The only time that you'll need, for example, /catalog/images/thumbs/pen-paper_1.jpg and /catalog/images/images_big/pen-paper_1.jpg, is where you have an additional image to display. These will need to be sized correctly prior to uploading via FTP. This step will soon be surplus, if/when I get round to releasing the in-progress next major release.

EJ

adatole
12-16-2009, 09:58 AM
I'm either confused, mis-configured, or both (likely both).

First, I *do* need additional images, so please help me understand how to proceed (the image_1.jpg, image_2.jpg files were in /images/thumbs already).

Based on your advice, I tried resizing the /thumbs pictures first, but it didn't make a difference.

Then I grabbed oscmax_V2.0.xEMRC5b2.zip and uploaded the whole thing to the site, over-writing the files that are there. I applied the SQL file although those were duplicate records, according to phpMyAdmin.

I still didn't have the "click to enlarge" option, nor did I have additional images. I figured that something is linked to actually ADDING the picture via the admin page (Catalog, Categories/Products). In editing an existing product (my intention was to re-upload the picture) I was greeted with this message:

Warning: require(additional_images.php) [function.require (http://www.promocustombranding.com/catalog/admin/function.require)]: failed to open stream: No such file or directory in /home6/promocus/public_html/catalog/admin/categories.php on line 956

Fatal error: require() [function.require (http://www.promocustombranding.com/catalog/admin/function.require)]: Failed opening required 'additional_images.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home6/promocus/public_html/catalog/admin/categories.php on line 956

Ever the optimist, I thought I'd *still* try to upload my picture. Alas and alak, there was no "save" or "submit" button to complete the process.

Because this *is* the start of the project and because I have a good copy of EasyPopulate (as well as a site backup), I'm willing to reload the system from scratch again. But please tell me which versions of OSCMax I should be downloading (2.0.4 or something else?) and which patches to apply. Also, should I be restoring from backup or is that introducing problems and I'd be better off going with EasyPopulate?

Thanks for the patient guidance and ongoing sense of humor!
- Leon

ridexbuilder
12-18-2009, 07:52 AM
Tell you what, you done well to find beta2! I had to search for the filename to grab it. Weird.
Anyways... In my haste to upload the file, I gave you lot a sneak preview of what I was working on (and didn't want released), so in the notes for that release (presented here with better formatting):

Added in a file to cater for bug in specials.php.
Instant update removed from categories.php, to make more modular and simpler to implement.

Please remove lines 955-957 from admin/categories.php:
<!-- additional images //-->
<?php require('additional_images.php'); ?>;
<!-- additional images //-->

Not included in this version.Apologies for that - I can never get the formatting correct in the Project Releases and should've replicated it here. Done now. ;)

ridexbuilder
12-18-2009, 08:03 AM
I'm either confused, mis-configured, or both (likely both). That's me - always!


I applied the SQL file although those were duplicate records, according to phpMyAdmin. - that would be down to the fact that you had already installed a previous release. You only need to apply any additional SQL statements, compared to the previous update (if any).


... But please tell me which versions of OSCMax I should be downloading (2.0.4 or something else?) and which patches to apply.
If you are using the 'standard' download of 2.0.4 and the aformentioned 'beta patch', then you're fine - there are other pseudo-development releases but for your purpose what you have should do the job.


... (my intention was to re-upload the picture) I was greeted with this message:...
Please try again, with the changes detailed in the previous post.

More to follow...
(Grabs a big gulp of caffeine)

ridexbuilder
12-18-2009, 08:18 AM
First, I *do* need additional images, so please help me understand how to proceed (the image_1.jpg, image_2.jpg files were in /images/thumbs already).

Using the product that I spotted in a previous post as an example.

Wood Memo Pad Holder With Pen
Through Admin, upload a large image of the product.
There should now be 2 images stored for this one view of the product.
/catalog/images/images_big/pen-paper.jpg & /catalog/images/thumbs/pen-paper.jpg

Assuming that you haven't changed the imagebase_{1} in Admin., additional images for this product will need to be stored as.



/catalog/images/images_big/pen-paper_1.jpg & /catalog/images/thumbs/pen-paper_1.jpg
/catalog/images/images_big/pen-paper_2.jpg & /catalog/images/thumbs/pen-paper_2.jpg
/catalog/images/images_big/pen-paper_3.jpg & /catalog/images/thumbs/pen-paper_3.jpg

This would give you three extra images, first displayed as thumbnails, with the opportunity to click on an individual one, to enlarge. Once one pic is enlarged you can also cycle through the other ones.

To see it in action:
ejSolutions Development Site : Sweatshirt [sws1] - £12.00 (http://dev.ejsolutions.co.uk/oscmax/catalog/product_info.php?cPath=2&products_id=2)
Right-click on each of the Images, select Properties. This should allow you to see a similar pattern to that detailed above.

adatole
12-18-2009, 09:40 AM
(First and foremost - THANK YOU for sticking with this. Much appreciation on my side of the internet.)

Well...

I deleted the site, modified admin/categories.php, re-uppped 2.0.4 and the beta2 patch, ran the install, and restored from backup.

Then I edited one of my items to use the admin interface to upload the graphic. Which worked except I got this error after clicking update:

Fatal error: Cannot redeclare mopics_file_exists() (previously declared in /home6/promocus/public_html/catalog/includes/functions/dynamic_mopics.php:12) in /home6/promocus/public_html/catalog/includes/functions/dynamic_mopics.php on line 23

After confirming that my product had a picture, and that the picture was automatically placed in /images/images_big and /images/thumbs (nice job on that enhancement!)

I then manually FTP'd <item>_1.jpg, <item>_2.jpg, etc) to /images/thumbs and /images/images_big (the same file each time since I don't need the additional items to be large.
I'm sorry to say that:
1) I don't have a "click to enlarge" option anywhere on the page and
2) I don't have additional images displayed below it on the product page.

Let me know if I've made a mis-step along the way.

For reference, the site is Promo Custom Branding : (http://www.promocustombranding.com/catalog) and the product "Name Plate" (under the category "wood products") is the item with pictures applied so far.

Thanks again for all the support.
- Leon

ridexbuilder
12-19-2009, 01:15 AM
I deleted the site, modified admin/categories.php, re-uppped 2.0.4 and the beta2 patch, ran the install, and restored from backup.
Where did you dream up that sequence? :rolleyes:

Upload 2.0.4; run the install; upload beta2 patch, following instructions. Do NOT restore from backups. You can restore from EasyPopulate though. As for categories.php :confused: - leave until you are well versed in 'Max. Re-upload 1st pics using Admin. - that way you have a template to follow.
Estimated time to complete (for a novice and assuming a fast connection): one hour, or less.

ridexbuilder
12-19-2009, 02:06 AM
..since I don't need the additional items to be large...
So why bother uploading to images_big/ ?

adatole
12-19-2009, 12:41 PM
So once again into the breech I go. This time I:


deleted directories and db
created new db
uploaded 2.0.4
ran install
uploaded beta2 patch
ran SQL with beta patch
Configured store by hand
backed up database (just to be safe)
Manually added a product. After clicking "update" I got this error


Fatal error: Cannot redeclare mopics_file_exists() (previously declared in /home6/promocus/public_html/catalog/includes/functions/dynamic_mopics.php:12) in /home6/promocus/public_html/catalog/includes/functions/dynamic_mopics.php on line 23

...and the item is not loaded.

I was able to upload an item using EasyPopulate, which I did and then edited the item to add the graphic. Upon hitting "update" I get the same Fatal error, and the graphic is not uploaded.

I'll keep looking at the instructions to see if there is a step I missed, but your assistance is greatly appreciated.

Thanks!

ridexbuilder
12-19-2009, 02:34 PM
Hmm,
I'll try to find time to have a look tomorrow (my time).

EJ

adatole
12-19-2009, 03:15 PM
Some additional information:

I swapped my edited version of admin/categories.php (the one with lines 955-957 removed per your instructions) with the original. I got the additional_images error.

Then I tried categories.php.alternate1 instead, and got the mopics error again.

Thanks for looking into this.
- Leon

ridexbuilder
12-20-2009, 06:08 AM
Well, this kept me quiet on a Sunday:
Updated release (now not Beta) - tested on an unmodified general release 2.0.4 (official) installation of osCMax.
http://www.oscmax.com/system/files/oscmax_V2.0.xEM-RC5.tar.gz (http://www.oscmax.com/forums/../system/files/oscmax_V2.0.xEM-RC5.tar.gz)
Note: changed layout for categories.php is now an option, not the default. ;)

EJ

ridexbuilder
12-20-2009, 07:00 AM
You may also find this SQL query to be useful - I'll add it to the next release (if there is one ;)).


UPDATE configuration SET configuration_value='jpg,jpeg,gif,png,JPG,JPEG,GIF ,PNG' WHERE configuration_key='DYNAMIC_MOPICS_BIG_IMAGE_TYPES' ;
UPDATE configuration SET configuration_value='jpg,jpeg,gif,png,JPG,JPEG,GIF ,PNG' WHERE configuration_key='DYNAMIC_MOPICS_THUMB_IMAGE_TYPE S';

michael_s
12-20-2009, 08:43 AM
Note that you should not add all those uppercase extensions to the dynamic mopics string, it greatly slows down the code. It would make more sense to rename the images to all use the same lowercase extension. Remember that speed is king, so every little bit counts. It is also very poor management practice to mix case on filenames/extensions. Best practice is to always use lowercase extensions.

Make sure you do. I am merciless when mocking case-mixers! ;)

After you rename all your images to use the same case extension, delete any unused extensions from the Dynamic Mopics string. Now your site is faster, more efficient and you look and feel smarter.

But you have too many images to rename? Get yourself a free file renamer.
Let me google that for you (http://tinyurl.com/yefxxz2)

Feels good to be in the know, eh?

ridexbuilder
12-20-2009, 09:01 AM
You're absolutely right, of course, Michael. :D
Those of us who run a proper OS and don't rely on lazy Windoze, already know the pitfalls of being lapse with file naming. :rolleyes:
I guess that I shouldn't encourage bad practices and leave the uppercase stuff out. The deal is: you remove TIFF and BMP from the standard install, on the next SVN. :p

michael_s
12-20-2009, 09:11 AM
Off Topic: EJ, Get testing that 2.0 dev I finished yesterday in svn. We can make a full TO-DO list before I release the next 2.0 package. We can include tons of db cleanup/config changes and get it out asap. Also, you have commit access to the repo now, so feel free to clean that up yourself in the 2.0 dev branch ;)

Back On Topic.

adatole
12-20-2009, 09:16 AM
YOU ROCK MY WORLD!!

That last update is what it took to get rolling. Please let me know what I can do to properly express my gratitude.

- Leon

ridexbuilder
12-20-2009, 10:19 AM
YOU ROCK MY WORLD!!

That last update is what it took to get rolling. Please let me know what I can do to properly express my gratitude.

- Leon
:D
(See the install instructions for that info. ;))
Could you switch the template back to fallback for a wee while - Slimbox isn't working in your current template? Does it work in fallback?

pgmarshall
12-20-2009, 10:35 AM
Please let me know what I can do to properly express my gratitude.

As usual EJ being very polite ...

... he has a donate link on his download page if you feel like buying him a beer for all his hard work on the MoPics stuff - link to this page is here. (http://ejsolutions.co.uk/info/Download/) (PayPal donate on right hand side)

If you would like to donate/buy a beer for the hosting/original developer of osCMax then don't forget to use the Donate button on the top of this forum or click this link. (http://www.oscmax.com/forums/misc.php?do=donate)

Regards,

ridexbuilder
12-20-2009, 10:44 AM
Slimbox now working (last time I looked) :-)
You could do with restricting the popup image a little (border disappearing below the screen at 1280x768, with minimal toolbars). Nothing major - would just look better, IMO.

EJ

[Michael - need to rebuild this version of Mint to get RapidSVN running smoothly - too much to do, too little time, too many things to sidetrack ;)]

adatole
12-20-2009, 10:56 AM
Thanks again for the input. Yeah, I'm messing with the various templates and nailing down that stuff now that I've got the base functionality working.

Thanks again. Donations coming soon.
- Leon

ridexbuilder
12-20-2009, 10:58 AM
Ahh, "adatole (http://www.oscmax.com/forums/members/adatole.html)" is a kindred spirit (I'm ex-CA Unicenter TNG Engineer/Implementation Consultant).
[A worthwhile guy to help out, then ;)]

JRR
03-02-2010, 07:44 PM
Might be handy for some:
http://www.oscmax.com/blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial (http://www.oscmax.com/forums/../blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial)

"Page Not Found" - needs attention...

John :-#(#

ridexbuilder
03-02-2010, 10:48 PM
Out of date - that's what the wiki is for.
:mexican:

cse709
03-03-2010, 04:56 PM
I recently installed v2.0.15. The installation was easy, even for on non-techie. I would like to clarify what one should expect for image presentation without additional modifications:

All the product thumbnails display properly with the "click to enlarge" link below. When I click on this link, the larger image displays in a separate window or tab. Is this what I should expect?

Does the included configuration of Slimbox2 offer additional functions? If so, what does one have to do to activate it?

What is the best way to add additional product image display functions beyond the out-of-the-box version of v2.0.15?

Thanks for your ongoing patience and support.

JRR
03-03-2010, 09:06 PM
Quote:
Originally Posted by ridexbuilder http://www.oscmax.com/forums/images/buttons/viewpost.gif (http://www.oscmax.com/forums/18732-enhanced-dynamic-mopics-images-stored-directories-post44607.html#post44607)
Might be handy for some:
http://www.oscmax.com/blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial

"Page Not Found" - needs attention...

http://www.oscmax.com/forums/images/icons/icon12.gif Re: Enhanced Dynamic MoPics and Images stored in directories
Out of date - that's what the wiki is for.

Perhaps, but it wouldn't hurt to change the link to point to the wiki. Trust me, the wiki isn't that easy to find for newbies. This page (Enhanced Dynamic MoPics and Images stored in directories - osCMax - osCommerce Maximized (http://www.oscmax.com/project/Enhanced_Dynamic_MoPics)) turns up in search engine results, and many of the links on that page are dead. I imagine a few people get the dead link and then wander off in frustration because there is no obvious link to the documents.

John :-#)#

ridexbuilder
03-03-2010, 10:49 PM
I recently installed v2.0.15. The installation was easy, even for on non-techie. I would like to clarify what one should expect for image presentation without additional modifications:

All the product thumbnails display properly with the "click to enlarge" link below. When I click on this link, the larger image displays in a separate window or tab. Is this what I should expect?

Does the included configuration of Slimbox2 offer additional functions? If so, what does one have to do to activate it?

What is the best way to add additional product image display functions beyond the out-of-the-box version of v2.0.15?

Thanks for your ongoing patience and support.

If you switch back to fallback template (the default) then Slimbox works out-of-the box.
See Wiki Docs, for further info.

ridexbuilder
03-03-2010, 10:59 PM
Quote:
Originally Posted by ridexbuilder http://www.oscmax.com/forums/images/buttons/viewpost.gif (http://www.oscmax.com/forums/18732-enhanced-dynamic-mopics-images-stored-directories-post44607.html#post44607)
Might be handy for some:
http://www.oscmax.com/blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial

"Page Not Found" - needs attention...

http://www.oscmax.com/forums/images/icons/icon12.gif Re: Enhanced Dynamic MoPics and Images stored in directories
Out of date - that's what the wiki is for.

Perhaps, but it wouldn't hurt to change the link to point to the wiki. Trust me, the wiki isn't that easy to find for newbies. This page (Enhanced Dynamic MoPics and Images stored in directories - osCMax - osCommerce Maximized (http://www.oscmax.com/project/Enhanced_Dynamic_MoPics)) turns up in search engine results, and many of the links on that page are dead. I imagine a few people get the dead link and then wander off in frustration because there is no obvious link to the documents.

John :-#)#
Let's see...


Did anyone give donations toward this Enh. Dyn. MoPics Project? [Even though quite a few are using this contribution, some direct from my website] One exception.
Do I control what links work with this site?
Does it take a lot of brain cells to click the Wiki Docs link at the top of each page?
Do I enjoy hand-holding to the nth degree?

Answers on a postcard.
:breathfire:


:closed:

JRR
03-16-2010, 07:48 PM
Might be handy for some:
http://www.oscmax.com/blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial (http://www.oscmax.com/forums/../blog/ridexbuilder/enhanced_dynamic_mopics_stepbystep_tutorial)
Moved to wiki:
http://wiki.oscdox.com/dynamic_mopics

Mankowitz
03-18-2010, 12:02 PM
Sorry if this has been asked and answered, but here goes.


When I upload images through the admin page, it creates a big image and a thumbnail for me.

When I use easypopulate to fill the database, I upload the images to the images/ directory by FTP.

NOW, is there any way to get oscmax to automatically create thumbnails and big images for me, as if I had uploaded them through the admin page?

:help:

ridexbuilder
03-18-2010, 12:39 PM
Sorry if this has been asked and answered, but here goes.


When I upload images through the admin page, it creates a big image and a thumbnail for me.

When I use easypopulate to fill the database, I upload the images to the images/ directory by FTP.

NOW, is there any way to get oscmax to automatically create thumbnails and big images for me, as if I had uploaded them through the admin page?

:help:

Nope: Use Irfanview - see the wiki/my website. :rolleyes:

MrE03
03-24-2010, 01:40 AM
does the slimbox only work for the main image thumbnail and not the additional images?

pgmarshall
03-24-2010, 02:47 AM
Nope - Slimbox works for all the images that you have big images for.

Regards,

ridexbuilder
03-24-2010, 04:07 AM
(osCMax Testing Team) does the slimbox only work for the main image thumbnail and not the additional images?
Jeez, that is so basic! :rolleyes: Not only that but it groups them into Next, Previous - get testing man!

MrE03
03-28-2010, 08:42 PM
strange, i implemented the code into a recent template i purcahsed and its only working for the main thumbnail image, maybe i forgot the code somewhere. i did try it in fallback and it didnt work either..

ridexbuilder
03-29-2010, 01:04 AM
:t2th:
User error!
Read the wiki, can't be any clearer..
:bash:

MrE03
03-31-2010, 01:50 AM
dont mean to question the wiki, but i actually did read it before responding on here, and it didnt mention anything about slimbox http://wiki.oscdox.com/dynamic_mopics thats the only wiki link ive found

ridexbuilder
03-31-2010, 02:03 AM
dont mean to question the wiki, but i actually did read it before responding on here, and it didnt mention anything about slimbox http://wiki.oscdox.com/dynamic_mopics thats the only wiki link ive found
Should it? None of the other wikis mention the technology used eg. jquery, mootools, AJAX... :nerd:
If not messed about with, the fallback template works out-of-the-box for all product images. If it is compared to a custom template and the relevant javascript calls are inserted (as with any other code snippets), then the custom template will work too. (Mainpage.tpl.php and all relevant content/ files, product_info.tpl.php in particular.) I'm sure the BTS tutorial covers this in more depth.

MrE03
04-01-2010, 01:22 PM
ill take a look at it again and try another fresh install of the latest version of oscmax and see if perhaps a file was incorrectly uploaded etc and let you know

ridexbuilder
06-30-2010, 01:26 PM
Update:
New functionality - needs testing before mainstream inclusion.
http://www.oscmax.com/forums/oscmax-v2-features-discussion/23202-automatically-scaled-thumbs-2-0-25-a.html

ridexbuilder
07-28-2010, 06:46 AM
Yet more from this stable....
Upgrade now available, with latest jQuery and Slimbox versions.
More importantly, I've added new configuration options in, naturally, Admin.,Configuration,Images. :D
Popup images can now appear instantly, with no animation or you can govern the animation speed.
There's provision for adding in jquery.easing, for the adventurous (it's used in the Slideshow contribution). This allows various animation effects to be used for the popup.

Currently available as an easy upgrade pack at my website and posted to SVN.
Some indication of its popularity will be useful (even if just by using the Thanks button).

EJ

ridexbuilder
07-31-2010, 01:35 AM
Step by step guide mentioned previously, is replaced by various pages in the wiki.