Easy Populate CSV not adding to Custom Fields
I have Easy Popultae and have upgraded all the way to easy_populate_csv_1-2-5-7b version.
It all works great except that if I add a field in products and call it products_1url.
So, when I download the entrie csv file(without attributes) it creates it and adds the custom field.
If I populate the csv file and upload it, then the data in the field in not written to the database.
It doesn't matter if I am using the products table or the products_description table, never writes. I am completely stumped.
anyone have a clue?
Do I add stuff to the easypopulate.php file in my admin folder, or what????
zencart version 1.3.9h installed
Re: Easy Populate CSV not adding to Custom Fields
Referencing datbase field in PHP - using EZ Pop
I have succesffully got easy populate csv cersion to be able to upload my products and insert info into custom fields.
But no matter what I do I cannot get the PHP files to recognioze that it is not null
exapmple is tpl_product_info_display page has this code
Code:
<!--bof Product URL -->
<?php
if (zen_not_null($products_url)) {
if ($flag_show_product_info_url == 1) {
?>
<p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_url), 'NONSSL', true, false)); ?></p>
<?php
} // $flag_show_product_info_url
}
?>
<!--eof Product URL -->
now if I change the reference products_url to products_1_url in both places
it should use the new address, The purpose insn't for this but adding more links, but I don't want the links shown idf they are NULL.
I have verified that the field is in the proucts table and it has data in it.
what to do now?
Am I supposed to re-index the products_id? or rstart my server?
shared server so, I cannot . clues?
Substitute database field for another in php
I have a code from tpl_product_info_display that i am copying and adding a different reference from the database
PHP Code:
<!--bof Product URL -->
<?php
if (zen_not_null(products_url)) {
if ($flag_show_product_info_url == 1) {
?>
<p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode ($products_url, 'NONSSL', true, false)); ?></p>
<?php
} // $flag_show_product_info_url
}
?>
<!--eof Product URL -->
I have added anotther field in the products table called products_1_url
I can successfully load this field from easy populate csv version
if I change the existing products_url
to products_1_url then if the field is not NULL then it should populate the page where it is posted.
I cannot get this to work. any clues?
Would it make any difference if it was an existing not used database field?
Re: Easy Populate CSV not adding to Custom Fields
yes, I figuered part of it out, now my issues is using one of the field I created. I started a new thread for this. Thanks
Re: Easy Populate CSV not adding to Custom Fields
Moderator's note: multiple posts have been merged here. Please don't post the same problem in multiple threads and forums.
Re: Easy Populate CSV not adding to Custom Fields
Thank you and sorry, :oops:
I could not find the first code question I posted ar 2:12 PM so I reposted. Appears it was there all along.
My issues are not what the title suggests.
My issue has got to be simple to resolve. but I sure an't for the life of me see the resolution.
Re: Easy Populate CSV not adding to Custom Fields
I have found this code to check to see if my information exists in the database
PHP Code:
<?php
$result = mysql_query("SELECT * FROM zen_products");
while($row = mysql_fetch_array($result))
{
echo $row ['products_file1'];
echo "<br />";
}
?>
but I want the result to be posted inside this so it places the information where it states $products_file1 but it soen't work
Code:
<p id="productInfoLink" class="productGeneral centeredContent"><?php echo sprintf(TEXT_MORE_INFORMATION1, zen_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($products_filel), 'NONSSL', true, false)); ?></p>
clues?
Re: Easy Populate CSV not adding to Custom Fields
I have finnally found the answer to my question.
While searching the web for PHP answers I cam across this zencart thread.
http://www.zen-cart.com/forum/showthread.php?t=120523
It showed all of the areas where you need to include references to your added fields.
Admin- collect_info.php, preview_info.php
and modules, pages, product -main_template_vars.php
All works now. Thsii can be closed.... I have added that tread to my favorites.
My thanks to webego for posting a rehashed version from crazy_chris
awesome info......