evismaniac
10-04-2009, 07:09 PM
Hi there.
Great script, all working fine so far (other than this, but I think its me doing it wrong).
I have added around 400 products to my website via a datafeed.
I want these to all stay put, and people can then add reviews etc as normal.
I wish to run an update on a daily basis to update just 1 custom field, which is the price field.
I have used the script to add the price as a custom field, then I have added the price into my template itself (rather than using the WFReview template). The only thing in the WFReview template box is the title and description, everything else I have inserted into custom fields and added to my WP template!
So I have tried to re-upload the datafeed for one category, with just 1 amendment to a price for 1 product (just to test).
I have selected the saved template at step 1, ticked the 'ID' radio button for the 'product_name' field (which is a unique field), then ticked the 'price' box to update the custom field for 'price'.
On step 3, I have chosen the same category as the post it is already in, and finished the process.
When the cron then runs, I get the following errors repeated down the cron job log page, and it created a duplicate entry underneath the current post.
<p class='wpdberror'><strong>WordPress database error:</strong> [Duplicate entry '1760-4' for key 1]<br />
<code>INSERT INTO `wp_term_relationships` (`object_id`,`term_taxonomy_id`,`term_order`) VALUES ('1760','4','0')</code></p>
</div><div id='error'>
I think I am doing something wrong somewhere..? Could you point me in the right direction please?
I have read here -> http://www.reviewpluginforwordpress.com/support/showthread.php?t=243
Basically I just want to be able to run updates daily, and it only add 'new' products (if they are not there already), or only update the price custom field (if the product already exists).
Many thanks!
Great script, all working fine so far (other than this, but I think its me doing it wrong).
I have added around 400 products to my website via a datafeed.
I want these to all stay put, and people can then add reviews etc as normal.
I wish to run an update on a daily basis to update just 1 custom field, which is the price field.
I have used the script to add the price as a custom field, then I have added the price into my template itself (rather than using the WFReview template). The only thing in the WFReview template box is the title and description, everything else I have inserted into custom fields and added to my WP template!
So I have tried to re-upload the datafeed for one category, with just 1 amendment to a price for 1 product (just to test).
I have selected the saved template at step 1, ticked the 'ID' radio button for the 'product_name' field (which is a unique field), then ticked the 'price' box to update the custom field for 'price'.
On step 3, I have chosen the same category as the post it is already in, and finished the process.
When the cron then runs, I get the following errors repeated down the cron job log page, and it created a duplicate entry underneath the current post.
<p class='wpdberror'><strong>WordPress database error:</strong> [Duplicate entry '1760-4' for key 1]<br />
<code>INSERT INTO `wp_term_relationships` (`object_id`,`term_taxonomy_id`,`term_order`) VALUES ('1760','4','0')</code></p>
</div><div id='error'>
I think I am doing something wrong somewhere..? Could you point me in the right direction please?
I have read here -> http://www.reviewpluginforwordpress.com/support/showthread.php?t=243
Basically I just want to be able to run updates daily, and it only add 'new' products (if they are not there already), or only update the price custom field (if the product already exists).
Many thanks!