VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Quality & Testing VirtueMart 1.1.x => Virtuemart 1.1 Development (Archiv) => Q&T Resolved => Topic started by: patjun on July 06, 2008, 08:36:44 AM

Title: Bug [# 2206] Clone products and add product type
Post by: patjun on July 06, 2008, 08:36:44 AM
Hi,
i am new to VirtueMart, but i think i found a solution for this Bug.

I have made two changes in toolbar.virtuemart.html.php.


Version 1.1.1, row 51-60:

  $no_menu = vmGet( $_REQUEST, 'no_menu', 0 );
  $is_iframe = vmGet( $_REQUEST, 'is_iframe', 0 );
  $product_parent_id = vmGet( $_REQUEST, 'product_parent_id', 0 );
  $product_id = vmGet( $_REQUEST, 'product_id' );
  $script = '';
       
  if( is_array( $product_id )) {
    $product_id = "";
  }


I added on Line:

  $no_menu = vmGet( $_REQUEST, 'no_menu', 0 );
  $is_iframe = vmGet( $_REQUEST, 'is_iframe', 0 );
  $product_parent_id = vmGet( $_REQUEST, 'product_parent_id', 0 );
  $product_id = vmGet( $_REQUEST, 'product_id' );
  $script = '';
  $clone_product = vmGet( $_REQUEST, 'clone_product', 0 );
       
  if( is_array( $product_id )) {
    $product_id = "";
  }


and

Verion 1.1.1, row 170-176:

  vmMenuBar::startTable();

  if ($page == "product.product_form" && !empty($product_id) ) {
    if( empty($product_parent_id) ) {
      // add new attribute


I changed the first if clause. i have added:  && $clone_product!=1

  vmMenuBar::startTable();

  if ($page == "product.product_form" && !empty($product_id) && $clone_product!=1 ) {
    if( empty($product_parent_id) ) {
      // add new attribute


I hope my solution is correct.

Patrick

------
Joomla! 1.0.15 - VM 1.1.1
Title: Re: Bug [# 2206] Clone products and add product type
Post by: aravot on July 10, 2008, 19:41:15 PM
Thank you, your solution was committed, please check latest nightly build to make sure is working as intended.
Title: Re: Bug [# 2206] Clone products and add product type
Post by: korb on July 10, 2008, 20:57:32 PM
Thank you too!!
Title: Re: Bug [# 2206] Clone products and add product type
Post by: korb on July 14, 2008, 22:55:25 PM
The bug was busted. I mean fixed!
Title: Re: Bug [# 2206] Clone products and add product type
Post by: Marc O. on January 16, 2009, 12:39:46 PM
Can someone confirm this is still working in VM 1.1.2? Overhere it doesn't, unfortunately. Also, I've been google-ing to check if there is a way to include the images in a cloned product, but didn't find anything for VM 1.1.2. Will this be included in a next release of VM?
Title: Re: Bug [# 2206] Clone products and add product type
Post by: webgobe on May 20, 2010, 17:13:49 PM
Humm, I tried to clone some products with product types attached. During cloning these associations are lost. So, the bug is there still...
If anyone have an idea how this can be fixed, would be a great help. I need to implement for a client sort of "FULL CLONING", including the product type associations.
Title: Re: Bug [# 2206] Clone products and add product type
Post by: mowlman on November 30, 2010, 17:35:36 PM
any resolution?  I have many products to clone and it would be nice to also clone the images.
Thanks for your help.
Bill