News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Clone Product Bug ?

Started by Mister Paul, March 09, 2019, 14:53:43 PM

Previous topic - Next topic

Mister Paul

Hi,

I have VirtueMart 3.4.0 for now and saw today a strange behaviour when cloning a product:
modifying Image or Description in the cloned product is changing Image or Description in the original product...
And vice versa!

Is it a known bug or did I do something wrong?

Thanks for your help
Paul

GJC Web Design

QuoteIs it a known bug

not known bug, known behaviour .. I never use cloning of products .. too complex for me...
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

jenkinhill

If you change the SKU for the cloned product then the changes in desc etc become disassociated.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Mister Paul

Thanks very much jenkinhill for the trick!
But as there's no automatic SKU generated by default by Virtuemart, we get confused by Virtuemart cloning product option if we leave SKU empty.
That's not an obvious behaviour...

AH

We use cloning very often.

It is unlikely to be the SKU

Consider the product-alias - that has to be unique across products - should be handled by cloning for uniqueness - but sometimes people mess with it and make it non-unique?
Regards
A

Joomla 4.4.5
php 8.1

Mister Paul

I did empty the cloned Alias name. So it has been reinitialized on saving.
There must be something else that still bind original and cloned products...

AH

Have you checked that the two products NOW have different aliases
Regards
A

Joomla 4.4.5
php 8.1

GJC Web Design

I'm sure we had a long discussion ages ago incl. Max about clones and image handling ... have of course forgotten what was said but I know I was doing the image changing wrong and as MP found both get changed..
There is a trick somewhere i think..
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Mister Paul

@ AH
Unfortunately I can't check that now as I have deleted the problematic cloned product and replaced it by a fresh new created product...
I'll check that next time I'll clone a product (if I use this option again...)

@GJC Web Design
Yes, I think too that there's a tricky process in cloning products

Jörgen

#9
I clone products all the time and have never seen the crosslinking of product description. The "image description" on the other hand is a database etnry that holds the image and some extra data title etc. The same image description can be used in more than one place and will of course change image or image data on both appearances.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

AH

#10
Oh doh!!

Of course - I must remember to read the question properly.

This has nothing to do with SKU or aliases.

Yes the image file is the same for BOTH images

When you clone - the new product has an entry created in the product_medias table - It will point to an entry in the   _medias table

The media entry both products are pointing to in the media table will be the SAME entry.

To differentiate the images you need to create a new media table entry and have your cloned product point to that.

If you want to keep the images separate (i.e changing the original image will not affect multiple products)  you need to create a new media table entry.

In the images tab "clear" the cloned image value
Then
(Browse) to get a new media file for this product.  Select the image and save the product.

(See my screen grabs below)

This will create a new media record in the media table and your new product will point to it.

If you do not do this - working on a media file will affect ALL items that point to the same entry in the media table



Sometimes we WANT this single image behaviour - where one image is used for multiple products - where one single image change will affect many products that are "pointing/using" it.




Regards
A

Joomla 4.4.5
php 8.1

Mister Paul

Thanks for your posts.

AH, I almost did the process you described for image replacement.
But I'm not sure to have fully cleared the thumbnail + main image before image replacement...

In my opinion, a cloned product was a just the copy of a product at a given moment. But with no crosslinks.
I'll be more suspicious next time.

AH

Note

You are not "replacing"  - that process will change the exiting image in the media table

You are uploading new image file to the media table and pointing to it for the current product - so the image action is (NONE)

IMHO the current cloning - where the image is the saem for the cloned and clonee - can save a lot of time :-)
Regards
A

Joomla 4.4.5
php 8.1

Mister Paul

Thanks, that's more clear now for me.
;)

Studio 42

Quote from: Mister Paul on March 09, 2019, 14:53:43 PM
modifying Image or Description in the cloned product is changing Image or Description in the original product...
And vice versa!

images are shared for all products.
If you need 1 image per product, you have to upload a new one for each product else if you modify the description, you modify the description for all products using same image.