Page 36 of 43 FirstFirst ... 263435363738 ... LastLast
Results 351 to 360 of 427
  1. #351
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Hi Philou
    I'm on a my dev machine with zen 154, and I see now that inserting a product bookx is not adding the date_added in the products table.
    I've check the online shop, and I have that field filled, but I can reach a conclusion because:
    first - it's a zen 151 and the bookx module it's also different.
    Second - I actually upload the files as general product and convert them later.

    Can you confirm this, checking you database ?

    Thanks
    Best Regards
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  2. #352
    Join Date
    Jan 2006
    Posts
    165
    Plugin Contributions
    1

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Hi mesnitu,

    can you verify, whether the newly inserted products have a "date_added" before you convert them to product type Bookx ?
    "Date_added" shouldn't be touched by Bookx really. BookX just adds an extra table for the info that is not included in product type "general".

    Regards,
    p.

  3. #353
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Quote Originally Posted by philou View Post
    Hi mesnitu,

    can you verify, whether the newly inserted products have a "date_added" before you convert them to product type Bookx ?
    "Date_added" shouldn't be touched by Bookx really. BookX just adds an extra table for the info that is not included in product type "general".

    Regards,
    p.
    Yes, and if I convert them to bookx, the products_date_added remains with that date.

    inserting a bookx product type, doesn't ( at least here )
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  4. #354
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: Creating an add-on "product type book" for ZC 1.5

    And after the conversion to bookx, if I change something in that book, the products_last_modified gets data.

    I've seen this now, because I was working on the ep4 export and all I got was 0000.
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  5. #355
    Join Date
    Jan 2006
    Posts
    165
    Plugin Contributions
    1

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Just imserted a product of type BookX and the products_date_added seems fine.
    This is done via the MySQL command "now()", maybe your database doesn't play along?

    This happens in file: [ZENCART]/[YOUR_ADMIN]/includes/modules/product_bookx/update_product.php around line 81

    Code:
    $insert_sql_data = array( 'products_date_added' => 'now()',
                                    'master_categories_id' => (int)$current_category_id);
    You could try and put in there:
    Code:
    $'products_date_added' => '2001-01-01'
    and see if a newly created product has this date in the database. If no, then there's indeed a problem in the script. If yes, I suspect som time problem with your local webserver or MySQL.

    Regards,
    p.

  6. #356
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Well, sorry about that Philou
    I've made the two inserts with a defined date and with now() .... and both were inserted ok

    That's why I wanted to confirm, because I'm messing around a lot with this database with imports / exports, something has gone wrong... or I'm going crazy

    Sorry for wasting your time !
    Thanks
    Best Regards
    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  7. #357
    Join Date
    Jan 2006
    Posts
    165
    Plugin Contributions
    1

    Default Re: Creating an add-on "product type book" for ZC 1.5

    Ok. Whatever you do, don't go crazy ;)

  8. #358
    Join Date
    Aug 2014
    Location
    Lisbon
    Posts
    594
    Plugin Contributions
    0

    Default Re: Creating an add-on "product type book" for ZC 1.5

    “Though the problems of the world are increasingly complex, the solutions remain embarrassingly simple.” ― Bill Mollison

  9. #359
    Join Date
    Apr 2015
    Location
    United States
    Posts
    144
    Plugin Contributions
    0

    Default Re: New add-on "product type book" for ZC 1.5

    Quote Originally Posted by mesnitu View Post
    Hi
    You can. I'm not sure if I can guide you, cause it has been a while since I did that, but look at :
    admin/includes/modules/product_bookx/ and compare with the normal product.
    The files are this ones:

    collect_info.php
    copy_to_confirm.php
    delete_product_confirm.php
    preview_info.php
    update_product.php

    Ex: For the update , I have a include file, because bookx looks for a additional update_product*.php around line 380 ( I have 0.9.4-revision4 of bookx), but in others I dont', because I became aware of that latter. So see if you can take advantage of that.

    PHP Code:
    //** look for additional update_product*.php files and include now **//
        
    $incl_dir = @dir(DIR_FS_ADMIN '/includes/modules/product_bookx');
        while (
    $file $incl_dir->read()) {
            if (
    'update_product_' == substr($file015)) {
                include_once 
    DIR_FS_ADMIN '/includes/modules/product_bookx/' $file// This should handle any extra values collected in collect_info*.php
            
    }
        }
        
    $incl_dir->close(); 
    So I created a update_product_seo.php that has ( in the same folder)

    PHP Code:
    // BEGIN CEON URI MAPPING 1 of 1
        
    require_once(DIR_WS_CLASSES 'class.CeonURIMappingAdminProductPages.php');
        
        
    $ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
        
        
    $ceon_uri_mapping_admin->updateProductHandler($products_id$zc_products->get_handler($product_type));
        
        
    // END CEON URI MAPPING 1 of 1 
    For the collect_info.php same thing, created a collect_info_seo.php,

    PHP Code:
        // BEGIN CEON URI MAPPING 1 of 2
        
    require_once(DIR_WS_CLASSES 'class.CeonURIMappingAdminProductPages.php');
        
        
    $ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
        
        
    $ceon_uri_mapping_admin->collectInfoHandler();
        
        
    // END CEON URI MAPPING 1 of 2 
    and around line 1158

    PHP Code:
     <?php if (isset($extra_html_end)) echo $extra_html_end// this was possibly filled by an included file above ?>
    <?php 
    // BEGIN CEON URI MAPPING 2 of 2
           
    echo $ceon_uri_mapping_admin->collectInfoBuildURIMappingFields();
    // END CEON URI MAPPING 2 of 2 ?>
    In the preview_info.php , it's diferent (don't ask me why)
    Around line 84 you'll see :

    PHP Code:
    foreach ($bookx_author_ids as $key => $author_id) {
                  
    $pInfo->authors_display .= (!empty($pInfo->authors_display) ? ' | ' '') . ($bookx_author_type_ids bookx_get_author_type_description($bookx_author_type_ids[$key], (int)$_SESSION['languages_id']) . ': ' '') . bookx_get_author_name($author_id);
              }
          }
    // BEGIN CEON URI MAPPING 1 of 4
          
    require_once(DIR_WS_CLASSES 'class.CeonURIMappingAdminProductPages.php');
          
          
    $ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
          
          
    $ceon_uri_mapping_admin->productPreviewProcessSubmission($current_category_id);
          
          
    // END CEON URI MAPPING 1 of 4
          
          
        
    } else { 
    Around line 146

    PHP Code:
    while (!$genres->EOF) {
              
    $pInfo->genres_display .= (!empty($pInfo->genres_display) ? ' | ' '') . $genres->fields['genre_description'];
              
    $genres->MoveNext();
          }
          
          
    // BEGIN CEON URI MAPPING 2 of 4
          
    require_once(DIR_WS_CLASSES 'class.CeonURIMappingAdminProductPages.php');
          
          
    $ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
          
          
    $ceon_uri_mapping_admin->productPreviewInitialLoad((int) $_GET['pID'],
            
    $zc_products->get_handler((int) $_GET['product_type']));
          
          
    // END CEON URI MAPPING 2 of 4

        

    Line 274

    PHP Code:
    <tr>
            <td class="main"><?php echo sprintf(TEXT_PRODUCT_MORE_INFORMATION$pInfo->products_url); ?></td>
          </tr>
    <?php
          
    }
    ?>
          <?php // BEGIN CEON URI MAPPING 3 of 4
          
    $ceon_uri_mapping_admin->productPreviewOutputURIMappingInfo($languages[$i]);
          
    // END CEON URI MAPPING 3 of 4 ?>
          <tr>
            <td><?php echo zen_draw_separator('pixel_trans.gif''1''10'); ?></td>
          </tr>
    Around 353

    PHP Code:
    echo ( (isset($_GET['search']) && !empty($_GET['search'])) ? zen_draw_hidden_field('search'$_GET['search']) : '') . ( (isset($_POST['search']) && !empty($_POST['search']) && empty($_GET['search'])) ? zen_draw_hidden_field('search'$_POST['search']) : '');
          
    // BEGIN CEON URI MAPPING 4 of 4
          
    echo $ceon_uri_mapping_admin->productPreviewBuildHiddenFields();
    // END CEON URI MAPPING 4 of 4
          
    echo zen_image_submit('button_back.gif'IMAGE_BACK'name="edit"') . '####'
    copy_to_confirm.php

    PHP Code:
    if ($_POST['copy_discounts'] == 'copy_discounts_yes') {
                  
    zen_copy_discounts_to_product($old_products_id, (int)$dup_products_id);
                }

                
    // BEGIN CEON URI MAPPING 1 of 1
                
    require_once(DIR_WS_CLASSES 'class.CeonURIMappingAdminProductPages.php');
                
                
    $ceon_uri_mapping_admin = new CeonURIMappingAdminProductPages();
                
                
    $ceon_uri_mapping_admin->copyToConfirmHandler($products_id_from$products_id_to,
                  
    $product->fields['products_type'], $zc_products->get_handler($product->fields['products_type']),
                  
    $categories_id);
                
                
    // END CEON URI MAPPING 1 of 1 
    But I also have the metatags ( not entirely working ), so in this folder I have

    collect_info_metatags.php
    collect_info_seo.php
    delete_product_confirm.php
    preview_info.php
    update_product_seo.php
    collect_info.php
    copy_to_confirm.php
    preview_info_meta_tags.php
    update_product.php

    I don't remember changing anything in meta_tags files. I think I just copy from modules/product
    Note: Metatags are working as normal product, but as I remember without them, I couldn't had any metatags at all.
    This is what I remember.... hope it can guide you.
    First let me thank you very, very much for easy populate/bookx plugin! Installed and working without a glitch. using Easy Populate 4.0.33a - Beta 02-29-2016 w/ BookX0.9.9

    I know it has been some time since I tried to implement the ceon URI mods you stated above but I could never get it to work as intended. Could you provide some help at this time? My setup:
    Zen Cart 1.54
    Responsive_sheffield_blue v2.0 template
    Bookx version 0.9.4 r8
    PHP Version 5.3.29

    When I tried to implement the changes you outlined above, I got the ceon uri code at the top of the collect_info page and could not get any further, and of course no ceon box at the bottom of the page, so could we start there if you have the time. There were other problems but I thought if I could get the collect_info.php working I might be able to figure out the other pages and maybe the metatags problems also.

    Best regards,

    Frank

  10. #360
    Join Date
    Jan 2006
    Posts
    165
    Plugin Contributions
    1

    Default Re: New add-on "product type book" for ZC 1.5

    Hi Frank,

    menitu must respond to you, since he wrote the original post.
    Let me just point out again, that there is an inclusion mechanism, which allows you to place a file which begins with "collect_info" like "collect_info_ceon_uri.php" and it will be included automatically by "collect_info.php". The same must then be implemented for "preview_info" and "update_product", so you deal with all your extra data in all three files and leave the original files untouched (if possible).

    Regards,
    p.

 

 
Page 36 of 43 FirstFirst ... 263435363738 ... LastLast

Similar Threads

  1. Why "No, Normal Shipping Rules" option for a "Product - Free Shipping" type?
    By ilikemike in forum Built-in Shipping and Payment Modules
    Replies: 3
    Last Post: 31 Dec 2011, 12:34 AM
  2. Replies: 5
    Last Post: 11 Sep 2009, 04:51 AM
  3. Different "Sold Out" images for each product type
    By Starlyn in forum Setting Up Categories, Products, Attributes
    Replies: 13
    Last Post: 20 Mar 2009, 10:37 PM
  4. Remove "Add: [ ]" and "Add selected products to cart" from product pages? possible?
    By edwardtilbury in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Sep 2008, 03:13 AM
  5. "Array()" line on "Update Address Book" page
    By vera in forum Managing Customers and Orders
    Replies: 10
    Last Post: 22 Sep 2006, 03:06 AM

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