Jump to content
VJ

Easy Populate & Products Attributes

Recommended Posts

I have installed this version: Frozen https://github.com/gburton/Responsive-osCommerce/archive/2341-Frozen.zip
Version Checker    
Installed Version: osCommerce Online Merchant v2.3.4.1 CE

And I have installed JcMagpie Version of Easypopuate.

How can I add the GTIN-number column in Easypopulate?
I have tried with this code:
$custom_fields[TABLE_PRODUCTS] = array( 'products_gtin' => 'GTIN');

In what line number shall I add above code in easypopulate if above code is correct?

I have tried to add this code to line number 270 but then when I login to the admin panel and click on the link to Easypopulate the website does not work anymore.
If I upload JcMagpie  orginal Easypopulate file again then it works again.
But it stops working as soon as I add above code line.
What am I doing wrong?

 

1701621124_Easypopulatepicture.thumb.jpg.ff4dc5a5b8b4a7097c658331a24e3708.jpg

 

Share this post


Link to post
Share on other sites

I received this reply from JcMagpie

You edited the wrong place!!

at line 303 in admin/easypopulate.php  use this. Replace the lines you have.

//$custom_fields[TABLE_PRODUCTS] = array(); // this line is used if you have no custom fields to import/export
$custom_fields[TABLE_PRODUCTS] = array( 'products_gtin' => 'GTIN');
$custom_fields[TABLE_PRODUCTS_DESCRIPTION] = array(); // this line is used if you have no custom fields to import/export

And now I am happy that it works.
THANK YOU VERY MUCH  JcMagpie

Share this post


Link to post
Share on other sites

anyone have any idea why all ep exports start with 2 spaces before v_products_model on the very 1st row (the header row)?

new install on 2.3.4.1 BS Frozen

  v_products_model v_products_name_1 v_products_description_1 v_products_url_1 ........


Jim Bullen - President

The Cigar Hut Group of Companies

 

 

Installed add-ons: (that now need to be upgraded to OSC CE Phoenix)

PWA, MVS, Easy Populate, Dynamic Sitemap, Featured Products, MVS Order Editor, MVS Shipping Estimator, Google XML Sitemap, About Us, Ad Tracker, Address Enhancer, Also Purchased, Backorders, Category Descriptions, Dynamic Meta Tags, Contact Us Email Subjects, Country state Selector, Extra Address Line, Order Number in Email Subject, OSC Affiliate, Product Extra Fields, Review Approval System, Reviews in Product Display, Sold Out, Sold Out (but Displayed), Ultimate SEO URL's, Updated Spiders, Welcome Email Password, Pending Order Email, Who's Online Enhancement, CCGV, Easy Discounts, Customer Comments, Request a Review, Sales Report, plus many many more!

Share this post


Link to post
Share on other sites

Hi all, I have googled and searched and it seems no one has had this issue, Even thou I have installed 2 different versions on two different setup and got the same issue

Domain 1
osCommerce Online Merchant v2.3.4
Installed oscom-easypopulate-2-76i-for-v2-3-1-mx6dI-VE98G
One catalog has Multi Products but not Easy Populate and the other has Easy Populate but is missing Multi Products

Domain 2
osCommerce Online Merchant v2.3.4.1 CE
installed oscom-easypopulate-BS3-Test V1.0
One catalog has Quick Updates but not Easy Populate and the other has Easy Populate but is missing Quick Updates

On both server I ended up with the Catalog box being duplicated one has
image.png.ab9395a1ac52ede984bb7a088e22b904.png

Settings & Info

EP vers: 1.0 Beta
osCommerce Online Merchant v2.3
OS: Array
HTTP:
DB:
PHP: Array (Zend: )

Temp Directory:
/home/xxxxxx/public_html/temp/
Temp Dir is Writable
Magic Quotes is: off
register_globals is: off
Split files on: 300 records
Model Num Size: 12
Price with tax: false
Calc Precision: 2
Replace quotes: false
Field seperator: comma
Excel safe output: true
Preserve tab/cr/lf: false
Category depth: 7
Enable attributes: true
SEF Froogle URLS: false

Other Support:
MVS Support: false
Products Images: true
qpbp: false
Additional Images: false
Additional Images: false
More Pics: false
UltraPics Pics: false
HTC: false
SPPC: false
Extra Fields: false
PDF Upload: false
Master Products: false

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  $cl_box_groups[] = array(
    'heading' => BOX_HEADING_CATALOG,
    'apps' => array(
      array(
        'code' => 'categories.php',
        'title' => BOX_CATALOG_CATEGORIES_PRODUCTS,
        'link' => tep_href_link('categories.php')
      ),
      array(
        'code' => 'products_attributes.php',
        'title' => BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES,
        'link' => tep_href_link('products_attributes.php')
      ),
      array(
        'code' => 'easypopulate.php',
        'title' => 'Easy Populate',
        'link' => tep_href_link('easypopulate.php')
      ),
      array(
        'code' => 'manufacturers.php',
        'title' => BOX_CATALOG_MANUFACTURERS,
        'link' => tep_href_link('manufacturers.php')
      ),
      array(
        'code' => 'reviews.php',
        'title' => BOX_CATALOG_REVIEWS,
        'link' => tep_href_link('reviews.php')
      ),
      array(
        'code' => 'specials.php',
        'title' => BOX_CATALOG_SPECIALS,
        'link' => tep_href_link('specials.php')
      ),
      array(
        'code' => 'products_expected.php',
        'title' => BOX_CATALOG_PRODUCTS_EXPECTED,
        'link' => tep_href_link('products_expected.php')
      )
    )
  );
?>
<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  $cl_box_groups[] = array(
    'heading' => BOX_HEADING_CATALOG,
    'apps' => array(
      array(
        'code' => FILENAME_CATEGORIES,
        'title' => BOX_CATALOG_CATEGORIES_PRODUCTS,
        'link' => tep_href_link(FILENAME_CATEGORIES)
      ),
      array(
        'code' => FILENAME_PRODUCTS_ATTRIBUTES,
        'title' => BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES,
        'link' => tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES)
      ),
      array(
        'code' => 'easypopulate.php',
        'title' => 'Easy Populate',
        'link' => tep_href_link('easypopulate.php')
      ),
      array(
        'code' => FILENAME_MANUFACTURERS,
        'title' => BOX_CATALOG_MANUFACTURERS,
        'link' => tep_href_link(FILENAME_MANUFACTURERS)
      ),
      array(
        'code' => FILENAME_REVIEWS,
        'title' => BOX_CATALOG_REVIEWS,
        'link' => tep_href_link(FILENAME_REVIEWS)
      ),
      array(
        'code' => FILENAME_SPECIALS,
        'title' => BOX_CATALOG_SPECIALS,
        'link' => tep_href_link(FILENAME_SPECIALS)
      ),
      array(
        'code' => FILENAME_PRODUCTS_EXPECTED,
        'title' => BOX_CATALOG_PRODUCTS_EXPECTED,
        'link' => tep_href_link(FILENAME_PRODUCTS_EXPECTED)
      ),
      array(
        'code' => FILENAME_DOCUMENTS,
        'title' => BOX_CATALOG_DOCUMENTS,
        'link' => tep_href_link(FILENAME_DOCUMENTS)
      )
    )
  );
?>

 

 

Share this post


Link to post
Share on other sites

I change Price with tax: false to true but then only base price is with tax and special without tax, not is possible both with tax?

Please I try several way but if use exported file with excel have problems to import, change data or characters...
but if change directly from text work correctly, how manage the exported file? no is possible export & import in xls/xlsx format?

Are there more compatible import and export modules with phoenix?

Thanks

Share this post


Link to post
Share on other sites
11 hours ago, domiosc said:

I change Price with tax: false to true but then only base price is with tax and special without tax, not is possible both with tax?

Please I try several way but if use exported file with excel have problems to import, change data or characters...
but if change directly from text work correctly, how manage the exported file? no is possible export & import in xls/xlsx format?

Are there more compatible import and export modules with phoenix?

Thanks

About the tax. I cant think of a reason why you would want the prices with VAT. If the government changes the VAT rate you are going to redo all the prices? If prices are without tax you just need to change the sales tax number in the admin.

About the characters. Libre Office deals with different encoding in CSV, MS EXCEL does not (in my experience). Basically edit the CSV file with Libre Office.

If you want to do some advanced stuff with the spreadsheet, open CSV file in Libre and save as xls. Then open it in Excel. When you have finished, open the xls in Libre and save as CSV and then re-import.

Share this post


Link to post
Share on other sites
Posted (edited)

If tax changes, change the tax value, all products have tax, when put price with tax the manager save both or not? or use with to save withour.
At least for base price, and in the specials manager use with tax, only need calculate specials price without tax, but the suppliers list it with tax...

For excel I found to macros for save csv with " "," " for an selection or for all sheet. Use ALT+F11

Sub CSVALL()
    ' init file name and save path
    Dim fName As String
    Dim fPath As String
    
    On Error GoTo 0
    
    ' select all cells
    ActiveWorkbook.Activate
    With ActiveWorkbook.WebOptions
        .Encoding = msoEncodingUTF8
    End With
    
    Cells.Select
    
    fName = "abc.txt"       ' ADD NAME HERE
    fPath = "C:\Temp\"      ' ADD PATH HERE
    
    QuoteCommaExport fName, fPath

End Sub
Sub QuoteCommaExport(fName, fPath)
   ' Dimension all variables.
   Dim DestFile As String
   Dim FileNum As Integer
   Dim ColumnCount As Integer
   Dim RowCount As Integer
    
   ' Prompt user for destination file name.
   DestFile = fPath & fName

   ' Obtain next free file handle number.
   FileNum = FreeFile()

   ' Turn error checking off.
   On Error Resume Next

   ' Attempt to open destination file for output.
   Open DestFile For Output As #FileNum

   ' Exception handling: if an error occurs report it and end.
   If Err <> 0 Then
      MsgBox "Cannot open fName " & DestFile
      End
   End If
    
   ' Turn error checking on.
   On Error GoTo 0
   
   ' Select active cells.
   ActiveCell.CurrentRegion.Select
   
   ' Loop for each row in selection.
   For RowCount = 1 To Selection.Rows.Count

      ' Loop for each column in selection.
      For ColumnCount = 1 To Selection.Columns.Count

         ' Write current cell's text to file with quotation marks.
         Print #FileNum, """" & Selection.Cells(RowCount, _
            ColumnCount).Text & """";

         ' Check if cell is in last column.
         If ColumnCount = Selection.Columns.Count Then
            ' If so, then write a blank line.
            Print #FileNum,
         Else
            ' Otherwise, write a comma.
            Print #FileNum, ",";
         End If
      ' Start next iteration of ColumnCount loop.
      Next ColumnCount
   ' Start next iteration of RowCount loop.
   Next RowCount

   ' Close destination file.
   Close #FileNum
End Sub

'
' @description        create file if file doesn't exist
'
Function CreateFile(fName As String, contents As String)
    Dim tempFile As String
    Dim nextFileNum As Long
    
    nextFileNum = FreeFile
    tempFile = fName
     
    Open tempFile For Output As #nextFileNum
    Print #nextFileNum, contents
    Close #nextFileNum
 
End Function

'
' @description      add quotes around text
'
Sub QuotesAroundText()
    Dim c As Range
        For Each c In Selection
        If Not IsNumeric(c.Value) Then
            c.Value = """" & c.Value & """"
        End If
    Next c
End Sub

 

Sub CSVSELECT()
    ' Dimension all variables.
    Dim DestFile As String
    Dim FileNum As Integer
    Dim ColumnCount As Long
    Dim RowCount As Long
    
    Dim fsT As Object
    Set fsT = CreateObject("ADODB.Stream")
    
    fsT.Type = 2 'Specify stream type - we want To save text/string data.
    fsT.Charset = "utf-8" 'Specify charset For the source text data.
    fsT.Open 'Open the stream And write binary data To the object
    
    ' Prompt user for destination file name.
    DestFile = InputBox("Enter the destination filename" _
            & Chr(10) & "(with complete path):", "Quote-Comma Exporter")
    
    ' Obtain next free file handle number.
    ' FileNum = FreeFile()
    
    ' Turn error checking off.
    On Error Resume Next
    
    ' If an error occurs report it and end.
    If Err <> 0 Then
        MsgBox "Cannot open filename " & DestFile
        End
    End If
    
    ' Turn error checking on.
    On Error GoTo 0
    
    ' Loop for each row in selection.
    For RowCount = 1 To Selection.Rows.Count
        
        ' Loop for each column in selection.
        For ColumnCount = 1 To Selection.Columns.Count
            
            ' Write current cell's text to file with quotation marks.
            fsT.WriteText """" & Replace(Selection.Cells(RowCount, ColumnCount).Text, """", """""") & """"
            
            ' Check if cell is in last column.
            If ColumnCount = Selection.Columns.Count Then
                ' If so, then write a blank line.
                fsT.WriteText vbNewLine
            Else
                ' Otherwise, write a comma.
                fsT.WriteText ","
            End If
        ' Start next iteration of ColumnCount loop.
        Next ColumnCount
    ' Start next iteration of RowCount loop.
    Next RowCount
    
    ' Close destination file.
    fsT.SaveToFile DestFile, 2
End Sub

Even so when importing the csv better all the columns type text.

I will have to try libreoffice, Thanks.

Edited by domiosc

Share this post


Link to post
Share on other sites

I try a little more, I have another problem with model have dash, for example 3197080-32 some products no update

For error No products_model field in record. This line was not imported or no import: you can solve open with notepad++ o similar change the codification to utf-8 without BOM if only utf-8 not is suficient.
And for fields they not need "quotation marks"

v_products_model,v_products_name_3,v_products_gtin,v_products_price,v_products_specials_price,v_products_quantity,EOREOR

Share this post


Link to post
Share on other sites
On 4/2/2020 at 8:21 PM, domiosc said:

I try a little more, I have another problem with model have dash, for example 3197080-32 some products no update

For error No products_model field in record. This line was not imported or no import: you can solve open with notepad++ o similar change the codification to utf-8 without BOM if only utf-8 not is suficient.
And for fields they not need "quotation marks"

v_products_model,v_products_name_3,v_products_gtin,v_products_price,v_products_specials_price,v_products_quantity,EOREOR

Hi,  I only use underscore "_" in the product_model field not "-"

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×