Page 23 of 28 FirstFirst ... 132122232425 ... LastLast
Results 221 to 230 of 272
  1. #221
    Join Date
    Oct 2010
    Posts
    34
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    I've followed solution to add another product field, but in a separate table. Everything was fine unless I try to add new products via Easy Populate. However EP populates products to db but my additional table that holds custom field is not updated with new product_id. So if I go to a new product (inserted via EP) the page doesnt show any data because main query in main_template_vars.php breaks when trying to read product_id that doesnt exist in additional table.

    I have ended creating trigger after insert which adds new product_id to the custom table, which is not elegant solution.

  2. #222
    Join Date
    Aug 2011
    Posts
    2
    Plugin Contributions
    0

    red flag Re: How-To: Add new Properties to your Products

    Hi everyone, i really interesting with this tips and I've finally finish that 8 steps. I success made 2 field and it appear on admin.

    1.But when I finish add a new product, the new page appear and it says:

    1054 Unknown column 'products_stock_lama' in 'field list'
    in:
    [insert into zen_products (products_quantity, products_type, products_model, products_price, products_date_available, products_weight, products_status, products_virtual, products_tax_class_id, manufacturers_id, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_discount_type, products_discount_type_from, products_price_sorter, products_stock_lama, products_stock_baru, products_image, products_date_added, master_categories_id) values ('0', '1', '', '0', '2011-08-12', '0', '1', '0', '0', '0', '1', '1', '0', '0', '0', '1', '0', '1', '0', '0', '0', '0', '0', '15116129', '15116129', 'aaaaddd3.jpg', now(), '6')]
    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.



    2.when i click the edit button for my product, the new page appear and :

    1054 Unknown column 'p.products_stock_lama' in 'field list'
    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.products_price_sorter, p.master_categories_id, p.products_stock_lama, p.products_stock_baru from zen_products p, zen_products_description pd where p.products_id = '6' 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.







    anyone, please help me . . .
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	11.JPG 
Views:	90 
Size:	14.6 KB 
ID:	9563   Click image for larger version. 

Name:	12.JPG 
Views:	98 
Size:	21.4 KB 
ID:	9564  
    Last edited by cummank; 11 Aug 2011 at 05:48 PM. Reason: add an image

  3. #223
    Join Date
    Aug 2011
    Location
    Pacific NW
    Posts
    28
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    I followed the instructions in the first post and was able to add several fields to my collect_info page and am able to display them on my site. No problems there.

    Instead of the text entry fields on the collect_info page, I would like to use fckeditor. I got as far as getting the editor to display the correct info from the database but I can't get it to write to the database.

    Does any one have any experience with this?

    Thanks!

  4. #224
    Join Date
    Aug 2011
    Location
    Pacific NW
    Posts
    28
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    Here's the code related the the previous post:


    ************** this is the text field that reads and writes to the database. this works *******************

    <td class="main"><?php echo Specifications; ?></td>

    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '10') . '&nbsp;' .

    zen_draw_input_field('products_specifications', $pInfo->products_specifications, 'size="100"', zen_set_field_length(TABLE_PRODUCTS, 'products_specifications')); ?></td>

    </tr>



    ************** this is the fckeditor code that reads from the database, but won't update the database with any changes typed into it *******************

    <tr>

    <td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_SPECIFICATIONS; ?></td>

    <td colspan="2"><table border="0" cellspacing="0" cellpadding="0">

    <tr>

    <td class="main" width="25" valign="top"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?>&nbsp;</td>

    <td class="main" width="100%">

    <?php if ($_SESSION['html_editor_preference_status']=="FCKEDITOR") {

    $oFCKeditor = new FCKeditor('products_specifications[' . $languages[$i]['id'] . ']') ;

    $oFCKeditor->Value = (isset($products_specifications[$languages[$i]['id']])) ? stripslashes($products_specifications[$languages[$i]['id']]) : zen_get_products_specifications($pInfo->products_id, $languages[$i]['id']);

    $oFCKeditor->Width = '99%' ;

    $oFCKeditor->Height = '350' ;

    // $oFCKeditor->Config['ToolbarLocation'] = 'Out:xToolbar' ;

    // $oFCKeditor->Create() ;

    $output = $oFCKeditor->CreateHtml() ; echo $output;

    } else { // using HTMLAREA or just raw "source"



    echo zen_draw_textarea_field('products_specifications[' . $languages[$i]['id'] . ']', 'soft', '100%', '30', (isset($products_specifications[$languages[$i]['id']])) ? htmlspecialchars(stripslashes($products_specifications[$languages[$i]['id']]), ENT_COMPAT, CHARSET, TRUE) : htmlspecialchars(zen_get_products_specifications($pInfo->products_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE)); //,'id="'.'products_specifications' . $languages[$i]['id'] . '"');

    } ?>



    </td>

  5. #225
    Join Date
    Aug 2011
    Location
    Pacific NW
    Posts
    28
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    One other thing. I'd like to have 5 instances of fckeditor on the collect_info page.

    Thanks!

  6. #226
    Join Date
    Mar 2011
    Location
    Ireland
    Posts
    286
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    Quote Originally Posted by molywerks View Post
    Gillian -

    My custom data is now running through Tabbed Products Pro, but from an old tpl_product_info_display.php file I found this line of code which shows the title in bold and the data in plain via my CSS file:
    [FONT="Courier New"]
    <?php if (!empty($product_info->fields['init_upc'])) echo '<tr><td class="detail-head">UPC&nbsp;&raquo;&nbsp;</td><td class="detail-copy">' . $product_info->fields['init_upc'] . '</td></tr>'; ?>[/FONT]

    where init_upc is my custom data field, and I am 99% positive this did not show UPC » when there was no data value.

    FWIW, in TPP, I have the following bit of PHP, which definitely does not show the title when there is no data value:
    [FONT="Courier New"]
    $fmtDOT .= (($flag_show_product_info_init_upc == 1 and !empty($init_upc)) ? '<li style="list-style:none;margin-left:-2.25em"><strong>upc</strong> &nbsp;' . $init_upc . '</li>' : '') . "\n";[/FONT]

    In the above example, like too many bits of hard-coded style values on my site, I have not yet converted it into CSS.
    Hi All,

    I am now on this thread as I picked up on the above link, I have tried to implement this but while my custom fields will show on product display page using the above code, they will not behave in the same manner when using TPP, has anybody else had this, I'm spending so much time on this and just seem to be going around in circles???

  7. #227
    Join Date
    Mar 2011
    Location
    Ireland
    Posts
    286
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    Hi All just to let ye know in case anyone comes across the same problem that I have got this sorted by using the following code allowed me to call in my custom fields for TPP:

    $fmtDOT .= '<li>' .TEXT_PRODUCT_COUNT . $products_count .($product_info->fields['products_count']). "\n";
    $fmtDOT .= '<li>' .TEXT_PRODUCT_UNIT_COST . $products_unit_cost .($product_info->fields['products_unit_cost']). "\n";

    Sooo Happy, might have been a walk in the park for some but a mountain climbed for me!!!!

  8. #228
    Join Date
    Jan 2008
    Posts
    19
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    I have tried it and it works ~~~

    But can anyone tell me how to add those new field and show in Product listing column and sort?

  9. #229
    Join Date
    Jul 2011
    Posts
    106
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    I have created quite a few fields which works perfectly, Thanks for this.

    What I would like to do is put a couple of these entered fields into my product listings page.

    Would I put the $product_info->fields['products_guarantee'] in my common/columnar_display file or my templates/product_listings page or some other page?

    And if so where would I need to add SELECT p.products_guarantee... part in?

    Any help would be appreciated.

    Jay

  10. #230
    Join Date
    Jul 2011
    Posts
    106
    Plugin Contributions
    0

    Default Re: How-To: Add new Properties to your Products

    Ok, so far I am think I need to add what I want in modules/product_listing.php but from what I have learnt in the past is that the modules files can be a little sensitive...

    ...so before I start to play around (obviously with a backup done:)) if anyone could save me a bit of time and point me in the right direction, that would greatly be appreciated.

 

 
Page 23 of 28 FirstFirst ... 132122232425 ... LastLast

Similar Threads

  1. change how latest products works or add new box that displays products we select
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 12 Oct 2010, 04:19 PM
  2. shopping cart contents and new properties to the products
    By stitchnkitty in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 10 Nov 2009, 05:50 PM
  3. Replies: 4
    Last Post: 20 Jun 2009, 04:06 PM
  4. !! Please help !! Add new Properties to your Products
    By JohnSquier in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 27 Feb 2008, 05:46 AM
  5. alter and add new product properties
    By jmitton in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 20 Jan 2008, 03:24 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR