Page 12 of 17 FirstFirst ... 21011121314 ... LastLast
Results 111 to 120 of 166
  1. #111
    Join Date
    Feb 2009
    Posts
    22
    Plugin Contributions
    1

    Default Re: Editing cart contents -- esp products with attributes

    Also when one does find the appropriate file do I REPLACE lines in the tpl_product_info_display.php or do i ADD them?



    Please help the n00bs

  2. #112
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

    Default Re: Editing cart contents -- esp products with attributes

    Hi JimmyX

    If you can't find that file, then the template that you are using doesn't override the core template file of the same name. In that case it is safe just to copy the tpl_product_info_display.php from the editcart mod into your includes/templates/TEMPLATE_NAME/templates folder.

    You might later want a better template than the classic one, and that will almost certainly have a customised tpl_product_info_display.php.
    In that case you have to manually open up that file and add my changes to your file. That will mean commenting some lines and adding some other lines. It sounds scarey, but if you make a copy of your original file first, it is pretty safe and not too hard.

    Good luck
    ============
    Kuroobiya - Personalized Karate Black Belts and Dogi
    Kanebo From Japan - Kanebo Cosmetics Direct From Japan

  3. #113
    Join Date
    Feb 2009
    Posts
    22
    Plugin Contributions
    1

    Default Re: Editing cart contents -- esp products with attributes

    ok well i am not scared to edit the php file... but i just am not sure what to comment out and what exactly to add.

    like ive found the commented parts i am supposed to add to my existing php file... but do i just add these lines just anywhere in between <!--bof Form start--> and <!--bof Form end-->

    basically i need to know EXACTLY what I should do, what i should comment out what i should replace what i should add.

  4. #114
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

    Default Re: Editing cart contents -- esp products with attributes

    Sorry for the slow reply, JimmyX. I hope you already got it going, if not ...

    You really just need to open up the tpl_product_info_display.php file and have a look at it. Because the changes you need to make are all commented on in there. Basically open up your tpl_product_info_display.php and open the editcart tpl_product_info_display.php and compare them as instructed in the read me.

    Anyway, here is a step by step guide:

    Comment out (or delete) the lines between
    <!--bof Form start--> and
    <!--bof Form end-->
    in your file.
    Then in place of them, ie between the bof Form tags, add the code from my file. So it will look like :
    Code:
    <!--bof Form start-->
    //add Justin Edit_Cart Mod 20080224
    
    if(is_numeric($_GET['products_id'])) {
    
    	$cartAction="add_product";	
    
    }else{
    
    	$cartAction = "edit_product_in_cart";
    
    }
    
    echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=' . $cartAction), 'post', 'enctype="multipart/form-data"') . "\n"; 
    
    //end of add Justin Edit_Cart Mod 20080224
    
    ?>
    <!--bof Form end-->
    Then go a little further down the file, and find this line
    Code:
    if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
    Comment (or delete) that line and all subsequent lines until , but NOT including the next
    Code:
    } else {
    Then just above that , [add these lines
    Code:
                if ($products_qty_box_status == 0 or $products_quantity_order_max== 1 or (! is_numeric($_GET['products_id'])) ) {
    
    
    
    					//Edit Justin replaced the $the_button with a new def. that supports editing,  20071120
    
    					//if the item being displayed was referred here from the cart, we are in edit mode  					
    
    					if (! is_numeric($_GET['products_id'])){
    
    						//establish	quantity of product in cart
    
    						$existing_quantity=$_SESSION['cart']->get_quantity($_GET['products_id']);
    
    						
    
    						//make the edit button
    
    						$the_button = '<input type="hidden" name="cart_quantity" value="' . $existing_quantity . '" />' . 
    
    									zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . 
    
    									zen_draw_hidden_field('edit_item_id', $_GET['products_id']) . 
    
    									zen_image_submit(BUTTON_IMAGE_EDIT_CART_CONTENTS, BUTTON_IMAGE_EDIT_CART_CONTENTS_ALT);
    
    					
    
    					//If we were not referred from cart, we are not in edit mode
    
    					}else{
    
    							
    
    				              // hide the quantity box and default to 1
    
    				              $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . 
    
    							  zen_draw_hidden_field('products_id', (int)$_GET['products_id']) .
    
    							  zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
    
    					}
    And you are all done! I hope it is helpful.

    Justin
    ============
    Kuroobiya - Personalized Karate Black Belts and Dogi
    Kanebo From Japan - Kanebo Cosmetics Direct From Japan

  5. #115
    Join Date
    Feb 2009
    Posts
    22
    Plugin Contributions
    1

    Default Re: Editing cart contents -- esp products with attributes

    Thank you for this very detailed information... I think my tpl_product_info_display.php has been edited by the other mods ive installed:

    Fast and Easy checkout 1.28
    Easy Signup / Login 1.20
    GoogleSitemapAdmin
    graphical_sales_report_v1-02
    monthly_sales_and_tax_summary_report_1-3
    save_for_later_1-0
    social_bookmarking_addtobookmarks_1-2


    anyways here is my tpl_product_info_display.php:

    PHP Code:
    <?php
    /**
     * Page Template
     *
     * Loaded automatically by index.php?main_page=product_info.<br />
     * Displays details of a typical product
     *
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @copyright Portions Copyright 2003 osCommerce
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_product_info_display.php 5369 2006-12-23 10:55:52Z drbyte $
     */
     //require(DIR_WS_MODULES . '/debug_blocks/product_info_prices.php');
    ?>
    <div class="centerColumn" id="productGeneral">

    <!--bof Form start-->
    <?php echo zen_draw_form('cart_quantity'zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post''enctype="multipart/form-data"') . "\n"?>
    <!--eof Form start-->

    <?php if ($messageStack->size('product_info') > 0) echo $messageStack->output('product_info'); ?>

    <!--bof Category Icon -->
    <?php if ($module_show_categories != 0) {?>
    <?php
    /**
     * display the category icons
     */
    require($template->get_template_dir('/tpl_modules_category_icon_display.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_modules_category_icon_display.php'); ?>
    <?php 
    ?>
    <!--eof Category Icon -->

    <!--bof Prev/Next top position -->
    <?php if (PRODUCT_INFO_PREVIOUS_NEXT == or PRODUCT_INFO_PREVIOUS_NEXT == 3) { ?>
    <?php
    /**
     * display the product previous/next helper
     */
    require($template->get_template_dir('/tpl_products_next_previous.php',DIR_WS_TEMPLATE$current_page_base,'templates'). '/tpl_products_next_previous.php'); ?>
    <?php 
    ?>
    <!--eof Prev/Next top position-->


    As you can see there is no <!--bof Form end--> or if there is i am blind and cannot see it at the top...

  6. #116
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

    Default Re: Editing cart contents -- esp products with attributes

    Oooops, sorry those enclosing tags should be

    <!--bof Form start-->


    <!--eof Form start-->

    Justin
    ============
    Kuroobiya - Personalized Karate Black Belts and Dogi
    Kanebo From Japan - Kanebo Cosmetics Direct From Japan

  7. #117
    Join Date
    Feb 2009
    Posts
    22
    Plugin Contributions
    1

    Default Re: Editing cart contents -- esp products with attributes

    ahh so id remove:

    <!--bof Form start-->
    ------------------------THIS LINE--------------------------------------
    <?php echo zen_draw_form('cart_quantity', zen_href_link(zen_get_info_page($_GET['products_id']), zen_get_all_get_params(array('action')) . 'action=add_product'), 'post', 'enctype="multipart/form-data"') . "\n"; ?>
    ------------------------THIS LINE--------------------------------------
    <!--eof Form start-->

  8. #118
    Join Date
    Sep 2007
    Posts
    77
    Plugin Contributions
    2

    Default Re: Editing cart contents -- esp products with attributes

    Yes.

    Get stuck into it JimmyX, and just make the changes. It'll work.

    J
    ============
    Kuroobiya - Personalized Karate Black Belts and Dogi
    Kanebo From Japan - Kanebo Cosmetics Direct From Japan

  9. #119
    Join Date
    Feb 2009
    Posts
    22
    Plugin Contributions
    1

    Default Re: Editing cart contents -- esp products with attributes

    Well I will now, since the readme and all the info I was looking at kept telling me to look for <!--bof Form end--> and i could not find this... I wasnt about to start editing things.

    Now I know i was looking for <!--eof Form start--> I am all set and I will proceed with the mod install.

    Thank you for all your help, it is much appreciated.

    I hope all this information can help others as well.

  10. #120
    Join Date
    Mar 2008
    Location
    Nashville, TN
    Posts
    21
    Plugin Contributions
    0

    help question Re: Editing cart contents -- esp products with attributes

    Hey There -
    So i've read through these threads and have seen that a lot of people seem to be having a similar problem that I am having but I didn't notice it getting resolved. Does anyone know if there is a solution to get edit cart to work with SEO URL optimized sites that have products with many attributes? I can get the SEO URL to work on every page except the ones that use the click to edit. Any help would be greatly appreciated. Thanks!

    Dasha

 

 
Page 12 of 17 FirstFirst ... 21011121314 ... LastLast

Similar Threads

  1. v151 Add multiple products with attributes to cart with single click
    By mark777 in forum General Questions
    Replies: 1
    Last Post: 16 May 2013, 08:33 AM
  2. Products with Attributes - Instant Add to Cart with PopUp?
    By ksoup in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 20 Jun 2009, 05:52 PM
  3. Add to Cart Not Appearing with Products with Attributes. Please help me!?!?
    By alegria in forum Setting Up Categories, Products, Attributes
    Replies: 9
    Last Post: 26 Jun 2008, 11:46 PM
  4. Replies: 2
    Last Post: 3 May 2008, 10:42 AM
  5. Shopping Cart contents editing failed
    By debtag in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 25 Feb 2008, 02:57 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