Author Topic: Bug [# 2206] Clone products and add product type  (Read 9085 times)

patjun

  • Beginner
  • *
  • Posts: 14
    • eniky - Webdesign aus Berlin
Bug [# 2206] Clone products and add product type
« 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:
Code: [Select]
  $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:
Code: [Select]
  $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:
Code: [Select]
  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
Code: [Select]
  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

aravot

  • Peter
  • Moderator
  • Sr. Member
  • *
  • Posts: 2874
    • VirtueMart Extensions
Re: Bug [# 2206] Clone products and add product type
« Reply #1 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.

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: Bug [# 2206] Clone products and add product type
« Reply #2 on: July 10, 2008, 20:57:32 pm »
Thank you too!!

korb

  • Quality&Testing Team
  • Full Member
  • *
  • Posts: 685
  • VM 2.0 in heavy testing
    • Buy my work
Re: Bug [# 2206] Clone products and add product type
« Reply #3 on: July 14, 2008, 22:55:25 pm »
The bug was busted. I mean fixed!

Marc O.

  • Jr. Member
  • **
  • Posts: 78
    • Onrust Yacht Charters
Re: Bug [# 2206] Clone products and add product type
« Reply #4 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?

webgobe

  • Advanced
  • Full Member
  • *****
  • Posts: 535
  • Follow me on Twitter! http://twitter.com/webgobe
    • Internet craftsman carrying on the heritage of European manufacturing traditions through original Web designs.
Re: Bug [# 2206] Clone products and add product type
« Reply #5 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.
Like a fine wine... Good from the start and getting better over time.
Donations are welcome!

mowlman

  • Jr. Member
  • **
  • Posts: 209
Re: Bug [# 2206] Clone products and add product type
« Reply #6 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