Page 12 of 16 FirstFirst ... 21011121314 ... LastLast
Results 111 to 120 of 154
  1. #111
    Join Date
    Nov 2009
    Posts
    12
    Plugin Contributions
    0

    help question Adding New Product_types - error 404

    hello
    im trying to add a new product type to zen 1.3.9a
    for now i only testing admin side and dident done nothing with catalog side.
    the things i have done till now :

    copy admin\includes\languages\english\product_music.php to admin\includes\languages\english\product_mobile.php
    copy admin\includes\modules\product_music
    to admin\includes\modules\product_mobile

    Code:
    INSERT INTO product_types  (type_name, type_handler, type_master_type, allow_add_to_cart) VALUES
    ("Product - Mobile Phone", "product_mobile", 1, "y");
    Code:
    INSERT INTO `product_type_layout` (`configuration_title`, `configuration_key`, `configuration_value`, `configuration_description`, `product_type_id`, `set_function`) VALUES
    ('Show Model Number', 'SHOW_PRODUCT_MOBILE_INFO_MODEL', '1', 'Display Model Number on Product Info 0= off 1= on', 6, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False'')), ');

    when try to add new product to "product - mobile phone"
    i get an error 404 Object not found! .
    http://localhost/demo/admin/product_...on=new_product

    can someone help me solve this ?
    Last edited by davico; 12 May 2010 at 11:45 PM.

  2. #112
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Adding New Product_types

    Did you make a file:
    /admin/product_mobile.php

    each Product Type has its own main file ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #113
    Join Date
    Nov 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: Adding New Product_types

    @Ajeh
    thank you man u the king

  4. #114
    Join Date
    Nov 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: Adding New Product_types

    all almost done but i have few problems in catalog side its not showing the information
    in file \includes\templates\template_default\templates\tpl_product_mobile_info_display

    the information will show only if i change this:

    $flag_show_product_mobile_info_network == 1
    to
    $flag_show_product_mobile_info_network = 1

    in table product_type_layout

    i have the key:

    ('Show Mobile Network', 'SHOW_PRODUCT_MOBILE_INFO_NETWORK', '1', 'Display Mobile Network on Product Info 0= off 1= on', 6, 6, NULL, '0000-00-00 00:00:00', NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'',''text''=>''True''),array('' id''=>''0'',''text''=>''False''))')

    my guess the problem is in file:
    includes\modules\pages\product_mobile_info\main_template_vars

    $$flag_show_product_mobile_info_network = zen_get_show_product_switch($_GET['products_id'], 'mobile_network');

    where the mobile_network is it should be same as one of the define files or some other file or var or something?


    can someone help me figure it up?
    Last edited by davico; 16 May 2010 at 01:15 PM.

  5. #115
    Join Date
    Nov 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: Adding New Product_types

    ok i answer myself

    i got one extra $ in
    $$flag_show_product_mobile_info_network

    and yes the mobile_network is the var from :

    main_template_vars_product_type

  6. #116
    Join Date
    Nov 2009
    Posts
    12
    Plugin Contributions
    0

    Default Product Type Info Page Layout options

    when im trying to to edit the Product Type Info Page Layout options
    for the mobile - product type i cant edit the options there is no dropdown box
    and i get error in myDEBUG-adm

    [18-May-2010 11:12:15] PHP Parse error: parse error in C:\xampp\htdocs\demo\admin\product_types.php(248) : eval()'d code on line 1

    [18-May-2010 11:12:15] PHP Stack trace:

    [18-May-2010 11:12:15] PHP 1. {main}() C:\xampp\htdocs\demo\admin\product_types.php:0

    when trying to edit the music product type there is no error
    any idea whats wrong ?

  7. #117
    Join Date
    Apr 2006
    Location
    London, UK
    Posts
    10,569
    Plugin Contributions
    25

    Default Re: Adding New Product_types

    Unfortunately there's nowhere near enough information in these error messages to be able to debug your code.

    A wild guess would be that you haven't set the standard configuration values for your product type (look at the other product types to see what they are). But that's a complete shot in the dark.

    Product types can be extremely complex and there's really no substitute for stepping interactively though each stage of the code checking that appropriate values that are being generated each time.
    Kuroi Web Design and Development | Twitter

    (Questions answered in the forum only - so that any forum member can benefit - not by personal message)

  8. #118
    Join Date
    Dec 2007
    Location
    Payson, AZ
    Posts
    1,076
    Plugin Contributions
    15

    Default Re: Product Type Info Page Layout options

    Quote Originally Posted by davico View Post
    when im trying to to edit the Product Type Info Page Layout options
    for the mobile - product type i cant edit the options there is no dropdown box
    and i get error in myDEBUG-adm
    Maybe something in your sql statement not right.... for product layout you need 11 tabs.... I only see 10. I'm guessing you know that the type_id well be 6.. not sure why your using NULL for one date and '0000-00-00 00:00:00' for the other.... wouldn't NULL, NULL work or now(), now()
    ('Show Mobile Network', 'SHOW_PRODUCT_MOBILE_INFO_NETWORK', '1', 'Display Mobile Network on Product Info 0= off 1= on', 6, 6, NULL, '0000-00-00 00:00:00', NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'',''text''=>''True''),array('' id''=>''0'',''text''=>''False''))')
    This is how I would do it... assuming product_mobile is your product type...
    Code:
    SET @t4=0;
    SELECT (@t4:=type_id) as t4 
    FROM product_types
    WHERE type_handler= 'product_mobile';
    INSERT INTO product_type_layout VALUES('', 'Show Mobile Network', 'SHOW_PRODUCT_MOBILE_INFO_NETWORK', '1', 'Display Mobile Network on Product Info 0= off 1= on', @t4, 6, now(), now(), NULL, 'zen_cfg_select_drop_down(array(array(''id''=>''1'', ''text''=>''True''), array(''id''=>''0'', ''text''=>''False''))');
    Once you clean up the sql problem, then it's just a mater of using in admin\includes\modules\product_mobile\collect_info.php

    Basically, if the sql statement is correct and no errors exist in MySQL database, the switch should work without cussing errors even if it's not called for anywhere else in your code.

    Product type book was a big help to me working with product type auction
    Dave
    Always forward thinking... Lost my mind!

  9. #119
    Join Date
    Nov 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: Adding New Product_types

    thanks for your replay
    collect_info working fine i can add update and preview products
    my problem is i think in file product_types.php when getting to action=layout_edit
    [SCR]http://img401.imageshack.us/img401/165/productype.jpg[/SCR]

    if ill click update it will change the value to 0
    Last edited by Kim; 25 May 2010 at 07:35 PM.

  10. #120
    Join Date
    Nov 2009
    Posts
    12
    Plugin Contributions
    0

    Default Re: Adding New Product_types

    forget about the older post i just gave up and started doing this product type again from the begging i followed up the music type-->music genre and its working perfect.
    but i need it to be with multi language support for the genre name.
    every time i try to do its not working
    can u please tell me what are the right lines for this.

 

 
Page 12 of 16 FirstFirst ... 21011121314 ... LastLast

Similar Threads

  1. Is there a way of adding a product but stopping it from adding to new products?
    By philpalmerdevon in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 19 Jan 2009, 02:07 PM
  2. When adding new parts, adding part number to preview screen
    By GTHENRY in forum Basic Configuration
    Replies: 1
    Last Post: 18 Jun 2008, 07:53 PM
  3. product_types.php details
    By MarkRS in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 30 Sep 2006, 06:40 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