Results 1 to 2 of 2

Easypopulate situation

This is a discussion on Easypopulate situation within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; I started using easy populate and here is the problem I am perplexed on. I uncommented the lines as stated ...

      
  1. #1
    osCMax Testing Team
    Join Date
    Sep 2004
    Posts
    357
    Rep Power
    10


    Default Easypopulate situation

    I started using easy populate and here is the problem I am perplexed on. I uncommented the lines as stated for seperate pricing for customers in easypopulate.php but now if you download a complete tab delimited text file there is no place for the customer group prices. But if you download the model/price/quantity file then the places for your all your customer group prices are there. How do you get it to work with the complete file?? Your help will be greatly appreciated.

  2. #2
    osCMax Testing Team
    Join Date
    Sep 2004
    Posts
    357
    Rep Power
    10


    Default RE: Easypopulate situation

    Ok thanks to Dcmo and Theengel in a couple different posts this is resolved and I will try and make it easier to find the code in oscmax v2.

    File to edit catalog/admin/easypopulate.php

    1st around line 1039 uncomment the number of pricing groups you are using.(uncomment meaning remove pound sign) In my case I am using 2 additional wholesale pricing groups in addition to the original retail pricing group. So the code would look like this.

    Code:
    'v_products_model'		=> $iii++,
    			'v_products_price'		=> $iii++,
    			'v_products_quantity'		=> $iii++,
    			'v_customer_price_1'		=> $iii++,
    			'v_customer_group_id_1'		=> $iii++,
    			'v_customer_price_2'		=> $iii++,
    			'v_customer_group_id_2'		=> $iii++,
    			#'v_customer_price_3'		=> $iii++,
    			#'v_customer_group_id_3'		=> $iii++,
    			#'v_customer_price_4'		=> $iii++,
    			#'v_customer_group_id_4'		=> $iii++,
    				);
    Second add the groups you are using in my case using 2 extra groups. If you are using more price groups they will need to be added to my example.
    Find this code around line 942
    Code:
     // VJ product attribs begin
         $header_array = array(
    			'v_products_price'		=> $iii++,
    			'v_products_weight'		=> $iii++,
    			'v_date_avail'			=> $iii++,
    			'v_date_added'			=> $iii++,
    			'v_products_quantity'		=> $iii++,
    			);
    and replace with
    Code:
     // VJ product attribs begin
          $header_array = array(
      'v_products_price'  => $iii++,
      'v_customer_price_1'  => $iii++,
      'v_customer_group_id_1'  => $iii++,
      'v_customer_price_2'  => $iii++,
      'v_customer_group_id_2'  => $iii++,  
      'v_products_weight'  => $iii++,
      'v_date_avail'   => $iii++,
      'v_date_added'   => $iii++,
      'v_products_quantity'  => $iii++,
      );
    Remember I am using 2 groups if you are using 3 or 4 they will need to be added to the above code.

    Last step is your table. Find this code around line 1896
    Code:
    '.TABLE_PRODUCTS_GROUPS.'
    							VALUES
    							(
    								' . $v_customer_group_id_1 . ',
    								' . $v_customer_price_1 . ',
    								' . $v_products_id . ',
    								' . $v_products_price .'
    								)'
    							);
    			}
    			if ($v_customer_price_2 != ''){
    				$result = tep_db_query('
    							INSERT INTO
    								'.TABLE_PRODUCTS_GROUPS.'
    							VALUES
    							(
    								' . $v_customer_group_id_2 . ',
    								' . $v_customer_price_2 . ',
    								' . $v_products_id . ',
    								' . $v_products_price . '
    								)'
    							);
    			}
    			if ($v_customer_price_3 != ''){
    				$result = tep_db_query('
    							INSERT INTO
    								'.TABLE_PRODUCTS_GROUPS.'
    							VALUES
    							(
    								' . $v_customer_group_id_3 . ',
    								' . $v_customer_price_3 . ',
    								' . $v_products_id . ',
    								' . $v_products_price . '
    								)'
    							);
    			}
    			if ($v_customer_price_4 != ''){
    				$result = tep_db_query('
    							INSERT INTO
    								'.TABLE_PRODUCTS_GROUPS.'
    							VALUES
    							(
    								' . $v_customer_group_id_4 . ',
    								' . $v_customer_price_4 . ',
    								' . $v_products_id . ',
    								' . $v_products_price . '
    								)'
    							);
    			}
    
    		}
    and remove the ,
    ' . $v_products_price . ' this includes the comma after previous entry so it looks like this.
    Code:
    '.TABLE_PRODUCTS_GROUPS.'
    							VALUES
    							(
    								' . $v_customer_group_id_1 . ',
    								' . $v_customer_price_1 . ',
    								' . $v_products_id . '								)'
    							);
    			}
    			if ($v_customer_price_2 != ''){
    				$result = tep_db_query('
    							INSERT INTO
    								'.TABLE_PRODUCTS_GROUPS.'
    							VALUES
    							(
    								' . $v_customer_group_id_2 . ',
    								' . $v_customer_price_2 . ',
    								' . $v_products_id . '								)'
    							);
    			}
    			if ($v_customer_price_3 != ''){
    				$result = tep_db_query('
    							INSERT INTO
    								'.TABLE_PRODUCTS_GROUPS.'
    							VALUES
    							(
    								' . $v_customer_group_id_3 . ',
    								' . $v_customer_price_3 . ',
    								' . $v_products_id . '								)'
    							);
    			}
    			if ($v_customer_price_4 != ''){
    				$result = tep_db_query('
    							INSERT INTO
    								'.TABLE_PRODUCTS_GROUPS.'
    							VALUES
    							(
    								' . $v_customer_group_id_4 . ',
    								' . $v_customer_price_4 . ',
    								' . $v_products_id . '								)'
    							);
    			}
    
    		}
    Thats it now you can use the complete tab delimited text file to edit all your pricing as well as attributes.

Similar Threads

  1. EasyPopulate
    By ELCHANCHO in forum osCMax v2 Features Discussion
    Replies: 3
    Last Post: 11-29-2005, 09:04 AM
  2. EasyPopulate 2.72
    By Yari_Gio in forum osCMax v1.7 General Mods Discussion
    Replies: 2
    Last Post: 12-01-2004, 12:05 AM
  3. easypopulate 2.72
    By Anonymous in forum osCMax v1.7 Installation
    Replies: 1
    Last Post: 05-16-2004, 08:39 PM
  4. easypopulate
    By swift in forum osCmax v1.7 Discussion
    Replies: 4
    Last Post: 04-15-2004, 04:09 AM
  5. NEED HELP EASYPOPULATE
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 1
    Last Post: 12-27-2003, 03:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •