Re: Easy Populate support for Version 1.2.5.4
Johnny,
The first thing I see is it appears that you used MS Word to create your table. Word adds way too much html code. Hence the junk in your desc.
Find a simple html editor. I use CoffeeCup. I think there is a trial version, but it's pretty cheap to buy. There are probably a few decent free ones. When you paste the code in description, make sure you are not in html editor mode in ZC.
I think your pasted link did not work because you are using the url add-on.
To prevent override of exiting descriptions will require code change. Looking at my prior suggestion, I realize it's even easier than that.
Find the UPDATE statement code around line 2260. Remove the section "products_description='" . zen_db_input $v_products_description".
Look very carefully at the code and remove everything about the description but not the needed delimiters for the rest of the statement.
This change will prevent ANY updates to description but will not affect the INSERT on new items.
I'm sorry but I don't have time now or I'd give you the complete change. If you can't get it, post back and I'll be glad to figure it out later.
Jeff
Re: Easy Populate support for Version 1.2.5.4
Quote:
Originally Posted by
credenscel
Every time i upload records via EP the products do show up on the site nicely, however, when I try to edit them in the Admin panel i get this error message:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.products_price_sorter, p.master_categories_id fr' at line 25
in:
[select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image, p.products_price, p.products_virtual, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id, p.products_quantity_order_min, p.products_quantity_order_units, p.products_priced_by_attribute, p.product_is_free, p.product_is_call, p.products_quantity_mixed, p.product_is_always_free_shipping, p.products_qty_box_status, p.products_quantity_order_max, p.products_sort_order, p.products_discount_type, p.products_discount_type_from, p.browse_by_make p.products_price_sorter, p.master_categories_id from zen_products p, zen_products_description pd where p.products_id = '55' and p.products_id = pd.products_id and pd.language_id = '1']
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
any idea how to fix it? :cry:
would anyone know how to get this working? please let me know
Re: Easy Populate support for Version 1.2.5.4
Jeff,
That makes sense.
But I can't figure out what template to go into to make the code change. I can't find a line 2260 in any of them for the life of me.
Pleased get back to me.
Johnny
Re: Easy Populate support for Version 1.2.5.4
jeff,
I sorry I didn't figure it out sooner!
I am now editing the EP file line 2254.
I will up date you later.
Thanks,
johnny
Re: Easy Populate support for Version 1.2.5.4
Jeff,
I don't know what I've done!
I have removes lines
2203
2042
2062
2076 from the easy populate php and it still overwrites the add on descriptions.
What am I doing wrong or what am I missing?
Johnny
Re: Easy Populate support for Version 1.2.5.4
Unless you've made other changes to EP, I would suggest starting over with a new version of easypopulate.php.
Starting at line 2052 you should have this code:
PHP Code:
// already in the description, let's just update it
$sql =
"UPDATE ".TABLE_PRODUCTS_DESCRIPTION." SET
products_name='" . zen_db_input($name) . "',
products_description='" . zen_db_input($v_products_description[$key]) . "',
";
if ($ep_supported_mods['psd'] == true) {
$sql .= "
products_short_desc='" . zen_db_input($v_products_short_desc[$key]) . "',
";
}
$sql .= "
products_url='" . zen_db_input($v_products_url[$key]) . "'
WHERE
products_id = '$v_products_id' AND
language_id = '$key'";
Put a // in front of each of these lines. That's it!
This section of code normally would update the description file IF the description exists. This change means the description would never change through EP.
New items are added with an INSERT several lines above, so that does not change.
As always, check carefully and TEST, TEST, TEST. I did not actually try this, but the code says it all and I see no reason why it should not work.
Jeff
Re: Easy Populate support for Version 1.2.5.4
credenscel,
Are you using EP free or Advanced? I don't see any code that looks like that in the free version.
If using advanced, you would need support from the sellers website. The versions are significantly different.
However, reading your post again, it sounds like your problem is not with EP.
What exact sequence of clicks get you to this message?
Re: Easy Populate support for Version 1.2.5.4
credenscel,
I think your problem in that statement is between "p.browse_by_make p.products_price_sorter" these 2 fields. I am far from a php expert, but it looks like there should be a comma after "make".
I don't see 'browse_by_make' in the product table structure. Do you have a mod that added new fields?
Jeff
Re: Easy Populate support for Version 1.2.5.4
Thanks for the reply
i'm using the free version
the browse by make is a sidebox
you can see it here:
http://protunerparts.com/zen/
I am getting the error when i go to "categories/products" and then click on the products that i've uploaded using EP (all other products that are uploaded manually work fine).
When i click on the Edit icon to edit the product i get that error :cry:
your input is much appreciated
Re: Easy Populate support for Version 1.2.5.4
Jeff,
We are on the right track now!
I changed the code to the following.
// already in the description, let's just update it
$sql =
"UPDATE ".TABLE_PRODUCTS_DESCRIPTION." SET
//products_name='" . zen_db_input($name) . "',
//products_description='" . zen_db_input($v_products_description[$key]) . "',
";
if ($ep_supported_mods['psd'] == true) {
$sql .= "
//products_short_desc='" . zen_db_input($v_products_short_desc[$key]) . "',
";
}
$sql .= "
//products_url='" . zen_db_input($v_products_url[$key]) . "'
WHERE
//products_id = '$v_products_id' AND
//language_id = '$key'";
But after the EP Upload Easy populate gave this error message
Warning An SQL error has occured. Please check your input data for tabs within fields and delete these. If this error continues, please forward your error log to the Easy Populate maintainer
Did I put one to many // in the code some where?
If I leave it, what will be the overall effect on the Zen Cart I have going?
Johnny