Jump to content

Removing "included images"


vidmarc

Recommended Posts

If I duplcate a product, then complete the new product's info, I'm left with the original product image, even though it's not linked in the image settings. I've tried clearing the cache and image cache, but the "included" images are still displaying. Any suggestions?

ps: I've just upgraded to 6.1.13. How do I edit my signature?

Edited by vidmarc
Link to comment
Share on other sites

Could the image that got cloned onto the new product be sitting in an image sub-folder? And that is why there is no gold star showing for any of the images currently listed in the Edit Product's Images tab?

Verify that you can change the image after first saving the newly cloned product's settings.

Link to comment
Share on other sites

I cannot replicate what you are experiencing (with CC6112).

In admin, Store Settings, Extra tab, with Clone Images checked, a cloned product carries over the images of the source item and can be changed.

Then, with Clone Images unckecked, a cloned product did not carry over the images from the source item. Viewing this cloned item in the storefront showed the skin's "No Image Available" image.

Link to comment
Share on other sites

I would think this is not a problem with the skin.

To review, you have the Clone settings in admin set to not include copying the image assignments?

If so, then when viewing the list of Product Inventory in admin, the new clones (should be at the top of the list) should show an empty space in the Image column. Is this the case?

 

Link to comment
Share on other sites

The way to remove the assignments of images to the product is via the Image Picker when editing the product. Unckeck and un-star the image associations.

There must be some checked checkboxes and a gold star shown in the Edit Product, Images tab. At the top of the Image Picker, there is a button that says to show only assigned images. However, I think that limiting the listing is still only relative to the current showing directory.

 

Link to comment
Share on other sites

We will need to make one more check to verify something. You will need to access the database directly using an external tool, such as phpMyAdmin. (phpMyAdmin is a tool commonly found in your hosting account's control panel.)

In CubeCart_inventory, locate the product_id for the suspect item. That item may be one of the last few items added to the table.

Using that product_id, and looking in CubeCart_image_index, filter the list for that product_id. It may help to reverse sort on the 'product_id' column.

Note any records that may exist having that product_id. If so, note the 'file_id's of those records and which one has 'main_img' with a '1' for the value.

Then, in CubeCart_filemanager, the' file_id's will show the path and filename of the images being used.

Now, if there are no records in CubeCart_image_index having the product_id of the suspect item, then... well, I don't know. I'll have to think about that case.

Edited by bsmither
Link to comment
Share on other sites

I've looked in phpMyAdmin for the last product I duplicated and there are three items with the same product ID number (51). Only one of these has "main_image" = 1

When I click on this item, I see:

id    int(10) unsigned / Value 177
product_id    int(10) unsigned     / Value 51
file_id    int(10) unsigned / Value 73

main_img = 1

I'm not sure how to view the image path?

   
Link to comment
Share on other sites

From the storefront code, I find:

var gallery_json = {
 "image_177":{"id":"177","product_id":"51","file_id":"73","main_img":"1","type":"1","disabled":"0","filepath":"","filename":"NUC0025-Demons-grey.jpg","filesize":"76686","mimetype":"image\/jpeg","md5hash":"7f794a12faaa6b620559c0801a16466c","description":"",
  "source":"\/images\/source\/NUC0025-Demons-grey.jpg","thumbnail":"\/images\/cache\/NUC0025-Demons-grey.100.jpg","category":"\/images\/cache\/NUC0025-Demons-grey.300.jpg","subcategory":"\/images\/cache\/NUC0025-Demons-grey.100.jpg",
  "gallery":"\/images\/cache\/NUC0025-Demons-grey.50.jpg","normal":"\/images\/cache\/NUC0025-Demons-grey.300.jpg","enlarge":"\/images\/cache\/NUC0025-Demons-grey.600.jpg","tiny":"\/images\/cache\/NUC0025-Demons-grey.30.jpg",
  "small":"\/images\/cache\/NUC0025-Demons-grey.175.jpg","medium":"\/images\/cache\/NUC0025-Demons-grey.300.jpg","large":"\/images\/cache\/NUC0025-Demons-grey.600.jpg"},
 "image_179":{"id":"179","product_id":"51","file_id":"69","main_img":"0","type":"1","disabled":"0","filepath":"","filename":"LostSoulBDgrey.jpg","filesize":"232923","mimetype":"image\/jpeg","md5hash":"722dbc7b5ea244a09498dcd383318150","description":"",
  "source":"\/images\/source\/LostSoulBDgrey.jpg","thumbnail":"\/images\/cache\/LostSoulBDgrey.100.jpg","category":"\/images\/cache\/LostSoulBDgrey.300.jpg","subcategory":"\/images\/cache\/LostSoulBDgrey.100.jpg",
  "gallery":"\/images\/cache\/LostSoulBDgrey.50.jpg","normal":"\/images\/cache\/LostSoulBDgrey.300.jpg","enlarge":"\/images\/cache\/LostSoulBDgrey.600.jpg","tiny":"\/images\/cache\/LostSoulBDgrey.30.jpg",
  "small":"\/images\/cache\/LostSoulBDgrey.175.jpg","medium":"\/images\/cache\/LostSoulBDgrey.300.jpg","large":"\/images\/cache\/LostSoulBDgrey.600.jpg"},
 "image_178":{"id":"178","product_id":"51","file_id":"72","main_img":"0","type":"1","disabled":"0","filepath":"","filename":"NUC0025-Demons.jpg","filesize":"76686","mimetype":"image\/jpeg","md5hash":"39c5608ecb69502ea97db4151490d8d4","description":"",
  "source":"\/images\/source\/NUC0025-Demons.jpg","thumbnail":"\/images\/cache\/NUC0025-Demons.100.jpg","category":"\/images\/cache\/NUC0025-Demons.300.jpg","subcategory":"\/images\/cache\/NUC0025-Demons.100.jpg",
  "gallery":"\/images\/cache\/NUC0025-Demons.50.jpg","normal":"\/images\/cache\/NUC0025-Demons.300.jpg","enlarge":"\/images\/cache\/NUC0025-Demons.600.jpg","tiny":"\/images\/cache\/NUC0025-Demons.30.jpg",
  "small":"\/images\/cache\/NUC0025-Demons.175.jpg","medium":"\/images\/cache\/NUC0025-Demons.300.jpg","large":"\/images\/cache\/NUC0025-Demons.600.jpg"}
}

So, CubeCart is reading the database correctly for the storefront.

We need to figure out why the Edit Product, Image Picker isn't showing these three files as selected.

Link to comment
Share on other sites

  • 1 month later...

Earlier, you said you upgraded to CC6113. Please check the following:

In the admin /skins/default/ folder, /js/plugins/jquery.filetree.min.js:

Near line 101, verify you have these statements:

if($("#val_product_id").length) {
  script_data.product_id = $("div#val_product_id").text();
}
if($("#val_cat_id").length) {
  script_data.cat_id = $("div#val_cat_id").text();
  d.unique = true;
}

a.getJSON(d.script, script_data, function(j) {

If the file has these exact statements, then perhaps your web browser is still using an older version of this file from its internal cache. If so, force your browser to reload the page resources. This is usually done with CTRL-F5.

If the file does not have these exact statements, then maybe this file did not get processed in the upgrade.

(On the other hand, I think the older file should still have worked.)

Link to comment
Share on other sites

Mine looks different.

                            if($("#val_cat_id").length) {
                                cat_id = $("div#val_cat_id").text();
                                d.unique = true;
                            }

                            a.getJSON(d.script, {
                                _g: "xml",
                                type: "files",
                                q: "list",
                                dir: g,
                                group: d.group,
                                product_id: product_id,
                                cat_id: cat_id
                            }, function(j) {
                                a(h).find(".start").html("");
                                var i = document.createElement("ul");
                                a(i).addClass("filetree");

 

Link to comment
Share on other sites

If you have this:

Near line 93:

var product_id = '';
var cat_id = '';

if($("#val_product_id").length) {
  product_id = $("div#val_product_id").text();
}
if($("#val_cat_id").length) {
  cat_id = $("div#val_cat_id").text();
  d.unique = true;
}

a.getJSON(d.script, {

Then this plugin is from CC6110 (and maybe CC6111) or older.

As I said, this older version of the file may still work, but I haven't tested it against CC6113.

I have to conclude some parts of your upgrade to CC6113 didn't happen. Assuming you have no changes to core code in your admin folder, try FTP'ing an entire /admin/ folder from a fresh download of CC6113 over your existing admin folder. (Be sure to keep the same admin folder name as the existing name.)

Because you are a Premium Member, is it not true that CubeCart HQ should have upgraded your site for you.

Edited by bsmither
Link to comment
Share on other sites

Upload the whole /admin/ folder. Rename the existing /admin_hAsHeY/ to /admin_older_version/. Rename /admin/ to /admin_hAsHeY/ where hAsHeY is the sequence of random letters that make the folder name 'unique'. (This renaming is so that you can easily restore if necessary. Once the newly installed administration has been checked out, you can delete /admin_older_version/.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...