Page 12 of 75 FirstFirst ... 210111213142262 ... LastLast
Results 111 to 120 of 741
  1. #111
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Printable Price list :: support thread

    @ seth04 and andyroe208: difficult to say anything about it without actually seeing it happen...

    @rhys100: it's in the pricelist configuration settings in your admin (but that might depend on the version...)

    I attached pricelist version 1.3.6 to this post (temporary), previous attached files will be removed soon.



    And I am taking a break form this thread. Maybe/probably I'll be back later again :-)
    Last edited by paulm; 21 Aug 2007 at 10:34 AM.

  2. #112
    Join Date
    Oct 2006
    Posts
    49
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    i have the latest version 1.3.6 and theres still no options in admin-->config--> pricelist profile 1/2
    am i missing something here?

  3. #113
    Join Date
    Sep 2005
    Location
    Adelaide South Australia
    Posts
    31
    Plugin Contributions
    0

    Default EZ-Pages sidebox dissapeared after PFP install?

    Hi Guys,

    Not sure if anyone has experienced this issue but after installing price list for printing on ZC V1.3.6 my EZ pages side box disappeared. I have checked the EZ admin area and the info is still all there and has the correct sort order but alas it just doesn't display. I have tried de-installing and re-installing a number of time but this makes no difference.

    Could the PFP DB install of affected my EZ-Pages db configuration?
    If so what do I need to restore the EZ Pages side box - getting down and dirty via PHPAdmin or some other magical method. :)

    Oh! and to all those installing this and contrib any Zen contribution - read the first line of the install section of the read me file and do it!

    BACKUP*BACKUP*BACKUP*BACKUP*BACKUP*BACKUP*BACKUP*BACKUP*BACKUP*BACKUP*BACKUP!

    Many Thanks

    Les :)

  4. #114
    Join Date
    Feb 2007
    Posts
    90
    Plugin Contributions
    0

    Default Re: EZ-Pages sidebox dissapeared after PFP install?

    I also have to ask, how do you turn off pics and descriptions, cant see an option in the list of settings. I used the latest version from the downloads section.

  5. #115
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Printable Price list :: support thread

    @psr racing: could you install price-list_v1.3.6.zip (attached to my post a couple of posts up in this thread) and tell me if it solves your problem?

    @webman: I am quite sure your EZ pages problem is not related to this contribution (Just to be sure I even checked it on a test Zen Cart 1.3.7 install + price-list_v1.3.6 and the EZ pages work just fine).

    @rhys100: I just installed price-list_v1.3.6 and the image and description settings are there, so it indeed looks like you're mising something. I attached a screenshot of the settings, which should be visible right after installing the included pricelist-3.sql.

    Older versions may not have this settings (or may have the settings in a configuration file).
    Attached Images Attached Images  

  6. #116
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    Hello everybody,

    A few days ago I asked how to add the "Add to cart button" to the pricelist.
    While waiting for an answer a friend of mine begun to try do it, as you'll see we are not a PHP specialists but he said this must be a copy/paste matter.

    So he did :

    in
    /includes/languages/english/extra_definitions/pricelist.php
    he added

    Code:
    define('TABLE_HEADING_ADDTOCART', 'Add to cart');
    at the end just before the last ?>

    in
    /includes/modules/pages/pricelist/header_php.php
    near line 119
    Code:
    after
    define('TEXT_PL_HEADER_LOGO', $pl_profile);
    he added
    eval('$pl_profile = TABLE_HEADING_ADDTOCART_' . PL_PROFILE . ';');
    define('TABLE_HEADING_ADDTOCART', $pl_profile);
    near line 203
    Code:
    After
    if (PL_SHOW_SOH == 'true') {
        $colspan++;
    
    he added
    
    $colspan++;
    near line 523
    Code:
    after
    
        if (PL_SHOW_TAX_FREE == 'true') {
            $columnsHeader .= '<td class="prcPL">' . TABLE_HEADING_PRICE_EX . PL_CURR_SYMBOL . '</td>' . "\n";
    
    he added
    
    $columnsHeader .= '<td>'. TABLE_HEADING_ADDTOCART . '</td>' . "\n";
    And finally near line 610
    Code:
    after
    
      if (PL_SHOW_TAX_FREE == 'true') {
            $prodRow .= '<td class="' . $price_class . '">' . $products_price_ex . '</td>' . "\n";
        }
    
    he added
    
    $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($products_id)) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($products_id) . '</p>' : '');
                  // show the quantity box
                  $prodRow .='<td>' . zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($products_id), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data" target="_Cartpage " class="AddButtonBox"') . "\n" . $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($products_id)) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$products_id) . '<br />' . zen_draw_hidden_field('products_id', (int)$products_id) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT). '</form></td>';

    And all this works, you get an "Add to cart button" for every product. when you clic on it, the cart is built in a new window or new tab (depends on the browser).

    BUT ! I tried to make it a bit cleaner and to go as far as I can to give the pricelist author clean files so that he can validate this modification. I tried to add a confirguration key in the database and to act regarding this key.


    The key I added is PL_SHOW_ADDTOCART_BUTTON
    Here is the SQL code
    Code:
    INSERT INTO `configuration` ( `configuration_title` , `configuration_key` , `configuration_value` , `configuration_description` , `configuration_group_id` , `sort_order` , `last_modified` , `date_added` , `use_function` , `set_function` )
    VALUES (
    'Show Add to cart button', 'PL_SHOW_ADDTOCART_BUTTON', 'true', 'Defines if the Add to cart button is visible or not.', '33', '210', NULL , '0001-01-01 00:00:00', NULL , 'zen_cfg_select_option(array(''true'', ''false''),'
    ), (
    NULL , '', '', '', '', '0', NULL , NULL , '0001-01-01 00:00:00', NULL , ''
    I wrapped the above modifications around "if{}" but, I don't see the new key in admin, nor the mod works. I must have an eval problem on my config key but I don't see where.

    Here are the final modifications in
    /includes/modules/pages/pricelist/header_php.php
    line 119
    Code:
    eval('$pl_profile = TABLE_HEADING_ADDTOCART_' . PL_PROFILE . ';');
    define('TABLE_HEADING_ADDTOCART', $pl_profile);
    eval('$pl_profile = PL_SHOW_ADDTOCART_BUTTON_' . PL_PROFILE . ';');
    define('PL_SHOW_ADDTOCART_BUTTON', $pl_profile);

    line 204

    Code:
    if (PL_SHOW_ADDTOCART_BUTTON == 'true') {
        $colspan++;
    }
    line 523
    Code:
       if (PL_SHOW_ADDTOCART_BUTTON == 'true') {
    $columnsHeader .= '<td>'. TABLE_HEADING_ADDTOCART . '</td>' . "\n";
        }
    line 610
    Code:
        if (PL_SHOW_ADDTOCART_BUTTON == 'true') {
        $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($products_id)) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($products_id) . '</p>' : '');
                  // show the quantity box
                  $prodRow .='<td>' . zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($products_id), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data" target="_Cartpage " class="AddButtonBox"') . "\n" . $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($products_id)) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$products_id) . '<br />' . zen_draw_hidden_field('products_id', (int)$products_id) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT). '</form></td>';
    }

    If any PHP guru could take a look at this and find the bug it would be very cool.

    Thanks for help

    Regards

    Hubert

    Here are the modified files.
    Attached Files Attached Files

  7. #117
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Printable Price list :: support thread

    Hi Hubert,

    very nice

    I also read your other post about it, but I didn't find to the time yet to answer it correctly.

    It looks like you have an error in the sql. Are you trying to update the existing sql? Or trying to create an sql file which updates an existing installation?

    If you would like to add it to the exsiting sql file you should add sometiming similar (just an example!) to this:
    Code:
    INSERT INTO configuration ( configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function )
    VALUES ( 'Images', 'PL_SHOW_IMAGE_1', 'false', 'If true products images are shown', @pricelistid , 210, NULL , 'zen_cfg_select_option(array(\'true\', \'false\'),' );
    for each profile to the sql file.

    PL_SHOW_ADDTOCART_BUTTON_1 for profile 1, PL_SHOW_ADDTOCART_BUTTON_2 for profile 2 and PL_SHOW_ADDTOCART_BUTTON_3 for profile 3

    In the example "210" is the sort order (where the setting is displayed in the admin compared to the other pricelist settings).

    hth, it's far too late here already...

  8. #118
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    Hi Paulm,

    i've just changed a bit the core so that the button is sometime "Add to cart" and sometime "more info"


    Code:
    if (PL_SHOW_ADDTOCART_BUTTON == 'true') {
                if (zen_has_product_attributes($products_id) ) {
              $prodRow .= '<td><a href="' . zen_href_link(zen_get_info_page($products_id), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $products_id) . '" target="_Cartpage " >' . MORE_INFO_TEXT . '</a></td>';
              }else{
    
              $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($products_id)) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($products_id) . '</p>' : '');
                  // show the quantity box
                  $prodRow .='<td>' . zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($products_id), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data" target="_Cartpage " class="AddButtonBox"') . "\n" . $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($products_id)) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$products_id) . '<br />' . zen_draw_hidden_field('products_id', (int)$products_id) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT). '</form></td>';
    }
    }
    but that's not the big problem for now,

    I found that if I trick my system by
    Code:
    //define('PL_SHOW_ADDTOCART_BUTTON', $pl_profile);
    define('PL_SHOW_ADDTOCART_BUTTON', 'true');
    Everything is fine, so I really got an eval problem.

    About the sql, I added (only for profile 1 for the moment),
    Code:
    VALUES ( 'Show Add to cart button', 'PL_SHOW_ADDTOCART_BUTTON°1', 'true', 'If true the an Add to cart button is shown for each product.', @pricelistid , 290, NULL , 'zen_cfg_select_option(array(\'true\', \'false\'),' );
    This is ok for seeing the setting in the admin profile 1 but this doesn't solve the eval problem, my system still doesn't see the value of the database field....


    Thanks for help

    Hubert

  9. #119
    Join Date
    Mar 2005
    Posts
    229
    Plugin Contributions
    0

    Default Re: Printable Price list :: support thread

    Oh ! I think I was messing up between my test config and my live config trying to see if it works on one while doing changes on the other one....


    I'll continue later...

    Can someone test that mod on a test site to see if it works ?

    Thanks

  10. #120
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Printable Price list :: support thread

    I think I was messing up between my test config and my live config trying to see if it works on one while doing changes on the other one....
    That probably explains the issue :-) The eval looks fine to me.
    (I only would not add a seaprate one for the table heading, but that's not really an issue just personal preference)

    An idea could be to combine the "More Info" and "Add to Cart" and put both in the same table cell maybe? Nobody wants to print either of those anyway I suppose, so those two would only be enabled in a profile not meant for printing.

    Some notes about the add to cart itself:

    Here $display_qty contains info about the amount of the product in the cart, but it looks like it's never echoed:
    Code:
        $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($products_id)) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($products_id) . '</p>' : '');
    If you add $display_qty to the table cell (i.e.: $prodRow .='<td>' . $display_qty . zen_draw_form..... etc etc) it may show. I am not sure if $flag_show_product_info_in_cart_qty is available, if not you can set it to 1 or remove it's check.

    And another minor issue:
    Code:
    target="_Cartpage "
    looks like an invalid HTML parameter. It probably won't break anything as it is, but I would replace it with:
    Code:
    target="_blank"
    I think I should have unsubscribed form this thread earlier, after I unsubscribed finally there is some interesting feedback again...

 

 
Page 12 of 75 FirstFirst ... 210111213142262 ... LastLast

Similar Threads

  1. Printable Price List by Paulm
    By helshop in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 25 Jan 2007, 12:27 PM
  2. printable price list
    By sparxs in forum All Other Contributions/Addons
    Replies: 26
    Last Post: 1 Nov 2006, 03:18 PM
  3. printable price list
    By Alik in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Sep 2006, 03:35 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