Page 13 of 28 FirstFirst ... 3111213141523 ... LastLast
Results 121 to 130 of 272
  1. #121
    Join Date
    Feb 2008
    Posts
    27
    Plugin Contributions
    0

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

    I had some time today and i managed to solve my problem:
    not to show on all my products the new field that i have added to products_description table.I managed that by checking another new field from table products_description, if set to 0 not to show new field and if set to 1 show the new field on product info display page.
    this is the code i used
    PHP Code:
    <!--bof Product fit-->
    <?php if ($product_info->fields['products_fiton'] != "1") {
      } else { 
    ?> 
    <div id="productDescription">
    <a href="javascript:animatedcollapse.toggle('jason')"><h1 id="productName" class="productGeneral">Arata toate modelele la care se potriveste</h1></a> 
    <div id="jason" style="background: #FFFFCC; display:none">
    <?php if (!empty($product_info->fields['products_fit'])) echo $product_info->fields['products_fit']; ?>
    </div>
    <?php ?>
    <!--eof Product fit -->
    Best regards Zoli

  2. #122
    Join Date
    May 2006
    Location
    Queensland, Australia
    Posts
    248
    Plugin Contributions
    0

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

    Greetings,

    I have followed the direction over and over and over and still can't get it to work..

    Everything works, except it dosnt show the value on the product view on the site, in Admin everything is working fine, the vaules even come up in PHPAdmin and i can change them in Admin as much as i want, it just won't show the vaule on the product view.

    Here is what i am talking about;

    http://www.agelessartifacts.com/stor...&products_id=1


    Here is a copy of the coding, it is combine with the Austpost shipping model.

    http://www.agelessartifacts.com/private/catalog.rar

  3. #123
    Join Date
    Aug 2005
    Location
    Southampton
    Posts
    80
    Plugin Contributions
    0

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

    Anyone have any ideas on how to add the new field to product listing. I have added delivery info to my product info. What I need is for my customers to be able to see this in my product list also. I have successfully added it to product info page but still puzzling away trying to get it in product listing. Any ideas anyone?

  4. #124
    Join Date
    Apr 2008
    Location
    London
    Posts
    596
    Plugin Contributions
    0

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

    Just wondering if anyone has managed to get this working using google maps on a product info page.

    As far as I see you could add as instructed in this thread and then, possibly, use the relevant co-ordinates to produce the map - in theory anyway!

  5. #125
    Join Date
    Sep 2008
    Location
    Toronto
    Posts
    35
    Plugin Contributions
    0

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

    Quote Originally Posted by janekbar5 View Post
    Hi
    I follow this post and managed to add 2 extra fields (Size A and size B). But on the product overview they can't be sortable (like quantity or weight). Is anybody know wher the problem can be?. The example is on :
    http://www.zancart137.may.com.pl/ind...dex&cPath=3_10

    Thanks in advance.
    Hi janekbar5, thanks for the great information that you provided, i tried everything, but i can't seem to some the added information on the product listing page.
    i went through every single posting on this thread, there is something missing i can find it, i checked this website that you posted http://www.zancart137.may.com.pl/ind...&cPath=3_67_71
    it's exactly what i'm looking for, if you can help me i would realy appreciate it.

    thanks

  6. #126
    Join Date
    Mar 2005
    Posts
    70
    Plugin Contributions
    0

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

    This has really been a great post and has helped a tons, so let me start by saying thanks !!

    i have figured out how to get my new fields to a new table and have also gotten my products_model to write to multiple tables, but the big problem im having is getting the Products_name to write to my `products` table as well as the `product_description` table?? i have gotten it to write, but when i check, the field only shows 'Array' any suggestions would be greatly appreciated. also if anyone is still looking for help on how to write to a new table, let me know and ill try to help.
    Never be afraid to try something new, remember that amateurs built the ark, professionals built the Titanic

  7. #127
    Join Date
    Sep 2008
    Location
    Toronto
    Posts
    35
    Plugin Contributions
    0

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

    janekbar5, i really want to know how you did that table view with the extra fields.

    thanks.

  8. #128
    Join Date
    Mar 2005
    Posts
    70
    Plugin Contributions
    0

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

    ok heres what i did

    created a new table called zen_bisac, then added the table in the includes/database_tables.php

    define('TABLE_BISAC', DB_PREFIX . 'bisac');

    on both collect_info.php and preview_info.php i added the following

    ################################################################################################################################################################

    from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd

    ################################################################################################################################################################ __

    from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_BISAC . " bs


    i also added my extra fields above that
    ################################################################################################################################################################ ___

    $product = $db->Execute("select pd.products_name, pd.products_description, pd.products_url,

    ################################################################################################################################################################ ___

    $product = $db->Execute("select pd.products_name, pd.products_description, pd.products_url,bs.products_model,bs.pages,bs.month,bs.year,bs.dewey,

    on collect info i made sure to add the datafields that will display on page

    <tr>
    <td class="main"><?php echo 'Pages '; ?></td>
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '13') . '&nbsp;' . zen_draw_input_field('pages', $pInfo->pages, zen_set_field_length(TABLE_BISAC, 'pages')); ?></td>
    </tr>
    <tr>
    <td class="main"><?php echo 'Pub Month '; ?></td>
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '13') . '&nbsp;' . zen_draw_input_field('month', $pInfo->month, zen_set_field_length(TABLE_BISAC, 'month')); ?></td>
    </tr>
    <tr>
    <td class="main"><?php echo 'Pub Year '; ?></td>
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '13') . '&nbsp;' . zen_draw_input_field('year', $pInfo->year, zen_set_field_length(TABLE_BISAC, 'year')); ?></td>
    </tr>
    <tr>
    <td class="main"><?php echo 'Dewey '; ?></td>
    <td class="main"><?php echo zen_draw_separator('pixel_trans.gif', '24', '13') . '&nbsp;' . zen_draw_input_field('dewey', $pInfo->dewey, zen_set_field_length(TABLE_BISAC, 'dewey')); ?></td>
    </tr>

    on collect_info.php i added the following lines

    $tmp_value = zen_db_prepare_input($_POST['pages']);
    $pages = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['month']);
    $month = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['year']);
    $year = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['dewey']);
    $dewey = (!zen_not_null($tmp_value) || $tmp_value=='' || $tmp_value == 0) ? 0 : $tmp_value;
    $tmp_value = zen_db_prepare_input($_POST['products_model']);


    around line 100 or so add the query

    $db->Execute("insert into " . TABLE_BISAC . "
    (products_id, products_model, pages, month,year,dewey)
    values ('" . (int)$products_id . "', '" . $_POST['products_model'] . "', '" . $pages . "', '" . $month . "', '" . $year . "', '" . $dewey . "')");

    that should pretty much do it !!!!
    Never be afraid to try something new, remember that amateurs built the ark, professionals built the Titanic

  9. #129
    Join Date
    Sep 2008
    Location
    Toronto
    Posts
    35
    Plugin Contributions
    0

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

    Hi zskiman,

    i followed your posting step by step, everything worked fine, the new fields show on the admin area when adding a new product, but it doesn't show on the product description and product listing pages, is there something i'm missing here, can you please help.

    thank you.

  10. #130
    Join Date
    Mar 2005
    Posts
    70
    Plugin Contributions
    0

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

    this may not be the best way, or there may be a better way to query from zen, but this is how i add to tpl_products_display.php

    at the top of page
    ############################################################

    // ***SQL Statement***:

    $prod_run= "SELECT * FROM zen_bisac WHERE products_model='$products_model'";

    $query_result = mysql_query($prod_run) or die(mysql_error());

    while($row = mysql_fetch_assoc($query_result)) {


    $month = $row[month];
    $year = $row[year];
    $dewey = $row[dewey];
    $pages = $row[pages];
    };
    ########################################################################################################################

    then wherever you want to display the variables just echo them

    echo 'Publication Date: ' . $month . '/' . $year . '<br>';

    and so on...

    you can also use some if statements to make sure they dont show if they are empty!!

    if ($month != ''){
    echo 'Publication Date: ' . $month . '/' . $year . '<br>';
    };
    Never be afraid to try something new, remember that amateurs built the ark, professionals built the Titanic

 

 
Page 13 of 28 FirstFirst ... 3111213141523 ... 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