VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: gba on December 01, 2015, 11:07:05 AM

Title: [SOLVED] Clone products unpublished
Post by: gba on December 01, 2015, 11:07:05 AM
Hi all!

I just noticed, that a cloned product has the same published status as the original product.
This seems to me not very practicable, as normally a 100% clone makes no sense in the shop - usually some modifications are made with a cloned product.
Therefore the clone function should, in my opinion, behave like i.e. cloning Joomla Modules: Being unpublished.

What do you think about that?

Kind regards,
Gerald
Title: Re: Clone products unpublished
Post by: Jumbo! on December 01, 2015, 12:27:49 PM
+1 from my side.
Title: Re: Clone products unpublished
Post by: Uke on December 06, 2015, 20:21:57 PM
Yes i agree, it should be unpublished by default.

(And the "product_sales" field should be set to 0 and not be copy from the original?)
Title: Re: Clone products unpublished
Post by: gba on December 10, 2015, 11:20:18 AM
Quote(And the "product_sales" field should be set to 0 and not be copy from the original?)

Do you mean the field 'product_ordered'?
Title: Re: Clone products unpublished
Post by: Milbo on December 10, 2015, 11:24:48 AM
There is a new hidden config, called product.published,
just use product.published=0
But is done within 5 minutes and yes I had the same idea some weeks ago.
Quote from: gba on December 01, 2015, 11:07:05 AM
that a cloned product has the same published status as the original product.
This seems to me not very practicable, as normally a 100% clone makes no sense in the shop - usually some modifications are made with a cloned product.
right
Title: Re: Clone products unpublished
Post by: Jörgen on December 10, 2015, 11:27:05 AM
Hello

No he means product_sales. I have made this visible in the backend with a override of the Product view. I see that it copies the value from the product that is cloned. In my case it is easy to both correct and see the actual sales figure.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Clone products unpublished
Post by: Milbo on December 10, 2015, 16:55:14 PM
Jörgen product_sales and product_ordered makes only sense together.
Title: Re: Clone products unpublished
Post by: gba on December 10, 2015, 16:58:34 PM
Thanks for fixing!  :)
Title: Re: [SOLVED] Clone products unpublished
Post by: Jörgen on December 11, 2015, 07:13:04 AM
@ Milbo

QuoteJörgen product_sales and product_ordered makes only sense together.

Yes I know this, in my case I have all three together in the admin Product Status view and can make an educated evaluation of the sales. But so far when I have cloned a product I inherit an old sales figure. If I later decide use this data in a sql Query I will get the wrong information. Now I can correct the inherited sales and also at a glance see if this is a shelf warmer or a hot selling item. The new configuration setting does not make this totally unneccesary, seeing the sales here is imho a good feature.

Here´s my litte snippet, added to administrato/templates/isis/html/com_virtuemart/product/product_edit_status.php, approx line 50.

<!-- sales -->
<th style="text-align:right;">
<?php echo vmText::_('COM_VIRTUEMART_PRODUCT_SALES'); ?>
</th>
<td colspan="3">
<input type="text" class="inputbox" name="product_sales" value="<?php echo $this->product->product_sales?>" size="3" />
</td>
<!-- end sales -->


I have been using this override since VM 1.1.

My best regards

Jörgen @ Kreativ Fotografi
Title: Re: [SOLVED] Clone products unpublished
Post by: GJC Web Design on December 11, 2015, 09:02:36 AM
What worries me about this post is that afaik not one poster is a native English speaker but all posts are grammatically perfect...

Oh .. if only English speakers could write like this.......  ;)
Title: Re: [SOLVED] Clone products unpublished
Post by: Jörgen on December 11, 2015, 09:20:43 AM
Thank You GJC , I think  :)

Jörgen @ Kreativ Fotografi
Title: Re: [SOLVED] Clone products unpublished
Post by: GJC Web Design on December 11, 2015, 12:17:51 PM
yes. it was a honest compliment to your collective word skills in a 2nd language.. ..  impressed  :)
Title: Re: [SOLVED] Clone products unpublished
Post by: jenkinhill on December 11, 2015, 15:09:59 PM
OK, GJ, now let's deal with your poor use of punctuation and capitalisation, starting with this lesson from an old friend of mine.  http://www.dreaded-apostrophe.com
Title: Re: [SOLVED] Clone products unpublished
Post by: GJC Web Design on December 11, 2015, 15:59:11 PM
he he...  I never included myself in the praise..  :P

I now pride myself on speaking and writing a sort of NW European gibberish ... having had a good grounding in a 7 house, 1 pub, 1 garage and 1 schoolroom NZ town in the  wop wops....

Title: Re: [SOLVED] Clone products unpublished
Post by: jenkinhill on December 11, 2015, 16:36:23 PM
 ;D