Hi,
Im using an extension called OpenStock(http://www.opencart.com/index.php?route ... on_id=2833), which in the product section has created an additional tab called Option Stock, where you can add photos, SKU, stock etc for each product variant
What is really annoying is that i have downloaded a 'new' image manager called Multi Image Upload manager(http://www.opencart.com/index.php?route ... on_id=6229) as the standard one is laggy and slow, which i can get working fine everywhere, except for the new Option Stock Tab.
Now i have looked into this myself(very limited php coding experience) and i can get the Multi Image Upload manager to appear when i click the 'Browse Files' button by the products in the Option Stock tab, and can select an image, which then appears in the image box, but when i click save, and then go back into the product the image has disappeared. So i need to work out how to get the image to save?
I wonder if anyone would be able to assist me with this. The guys at OpenStock say its only 30 min work, but would need to charge me an hourly rate, but im trying to keep costs down if possible as money is tight atm.
Thanks in advance, and i hope this make sense.
I can help you, but you'll need to contact me directly at sales@dakotaq.com. I'm the developer of the extension that you purchased.
DakotaQ Internet Services
"We Build Websites that Do Something!"
OpenCart Extensions, Installation Support, and Customization
Multi Image Management for 1.5.2+ and 1.5.3.1
Multi Image Management for 1.5.0+
We did this, it was two changes:
(Make sure you backup both XML files first).
Open the vqmod XML for the file browser plugin (vqmod_admin_elfinder.xml).
Around line 519, inside the addSingleImage() function, change the row to this:
(Basically we want the field name to match the original field's name, not replace it with the ID).
You'll then need to edit the openstock.xml file to use the new file browser.
Search for the text "<!-- Variation Image -->" (for me it was around line 726).
There's an A tag which has an onclick(), it currently triggers the default image manager.
You just need to replace the tag with this:
Make sure you clear the vqmod cache (empty the vqcache folder), and refresh your browser.
If you've done everything correctly it should trigger the new file browser, and selecting an image should save correctly.
I can't guarantee this code, it worked for us but you might be using slightly different code/mods. Hopefully it puts you on the right track.
(Make sure you backup both XML files first).
Open the vqmod XML for the file browser plugin (vqmod_admin_elfinder.xml).
Around line 519, inside the addSingleImage() function, change the row to this:
Code: Select all
$('#' + field).replaceWith('<input type="hidden" id="' + field +'" value="' + imageName + '" name="' + $('#' + field).attr('name') + '">');
You'll then need to edit the openstock.xml file to use the new file browser.
Search for the text "<!-- Variation Image -->" (for me it was around line 726).
There's an A tag which has an onclick(), it currently triggers the default image manager.
You just need to replace the tag with this:
Code: Select all
<a onclick="el_uploadSingle('pos_<?php echo $key; ?>_image', 'pos_<?php echo $key; ?>_thumb', '-1');">
If you've done everything correctly it should trigger the new file browser, and selecting an image should save correctly.
I can't guarantee this code, it worked for us but you might be using slightly different code/mods. Hopefully it puts you on the right track.
OpenCart enthusiast
PHP/MySQL/jQuery Developer
Who is online
Users browsing this forum: paulfeakins and 12 guests