osCmax v2.5 User Manual
Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Add to cart error

This is a discussion on Add to cart error within the osCmax v1.7 Discussion forums, part of the osCmax v1.7 Forums category; There seems to be an error in the add to cart link in the product_info page. (the link attached to ...

      
  1. #1
    Anonymous
    Guest


    Default Add to cart error

    There seems to be an error in the add to cart link in the product_info page. (the link attached to the button_in_cart.gif) It wants to send to a friend instead of adding the product to the cart. Since I have done nothing that I know of to effect this I am assuming it is a bug.

    BTW-
    Is there a way to set the cart so you don't have to login to add items to the cart?

  2. #2
    Member
    Join Date
    Feb 2003
    Posts
    32
    Rep Power
    0


    Default

    Yes when I click on the "Add to Cart" button on the product_info gage it goes to the "Tell a Friend" page. I can not find where this link is defined.
    Here is an example . Click on "Add to cart".

    http://www.kiesys.com/MS2MAX/product.../products_id/1

  3. #3
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    Strange. This does not happen for me at all.... I think this is a problem with your html edits. You are missing a closing </form> tag in rhe 'Tell a friend' box, so the middle form is picking up the method from the side box. Add a closing </form> tag and it will work correctly.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  4. #4
    Member
    Join Date
    Feb 2003
    Posts
    32
    Rep Power
    0


    Default

    That's weird because I didn't modify the box code. Thinking I screwed up something somewhere, I downloaded a fresh MAX zip from the site again and unzipped it and uploaded the tell a friend box and the same thing. Looking at view source I also see a missing closing form tag. Here is the box code, could you tell me where the </form> goes so I'm sure to get it right?

    Code:
    <?php
      $boxHeading = BOX_HEADING_TELL_A_FRIEND;
      $corner_left = 'square';
      $corner_right = 'square';
      $boxContent_attributes = ' align="center"';
    
      $boxContent = tep_draw_form('tell_a_friend', tep_href_link(FILENAME_TELL_A_FRIEND, '', 'NONSSL', false), 'get');
      $boxContent .= tep_draw_input_field('to_email_address', '', 'size="10"') . '&' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('products_id', $HTTP_GET_VARS['products_id']) . tep_hide_session_id() . '<br>' . BOX_TELL_A_FRIEND_TEXT;
    
      require(DIR_WS_TEMPLATES . TEMPLATENAME_BOX);
    
      $boxContent_attributes = '';
    ?>

  5. #5
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    It should look like this:

    Code:
    <!-- tell_a_friend //-->
    <?php
      $boxHeading = BOX_HEADING_TELL_A_FRIEND;
      $corner_left = 'square';
      $corner_right = 'square';
      $boxContent_attributes = ' align="center"';
    
      $boxContent = tep_draw_form('tell_a_friend', tep_href_link(FILENAME_TELL_A_FRIEND, '', 'NONSSL', false), 'get');
      $boxContent .= tep_draw_input_field('to_email_address', '', 'size="10"') . '&' . tep_image_submit('button_tell_a_friend.gif', BOX_HEADING_TELL_A_FRIEND) . tep_draw_hidden_field('products_id', $HTTP_GET_VARS['products_id']) . tep_hide_session_id() . '<br>' . BOX_TELL_A_FRIEND_TEXT;
      $boxContent .= '</form>';
    
      require(DIR_WS_TEMPLATES . TEMPLATENAME_BOX);
    
      $boxContent_attributes = '';
    ?>
    <!-- tell_a_friend_eof //-->
    I pulled that right out of the zip file... ??? Note that you are missing the line :
    Code:
    $boxContent .= '</form>';
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  6. #6
    Member
    Join Date
    Feb 2003
    Posts
    32
    Rep Power
    0


    Default

    That did it thanks. You may want to check the zip file.

  7. #7
    Member
    Join Date
    Feb 2003
    Posts
    32
    Rep Power
    0


    Default

    Just found this bug alert on the OSC forums regarding BTS:
    http://forums.oscommerce.com/viewtop...late+structure
    Bug Report:
    catalog/includes/boxes/tell_a_friend.php
    Add this line immidiately after line 21:
    $boxContent .= '</form>';
    Just thought you would like to know that it's not us.

  8. #8
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    Oops! I updated the zip file, but never put it on the server ! Damn. I guess I needed some sleep.
    Fixed.

    For anyone that just wants to drop in the fixed file, get it below:
    Attached Files Attached Files
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  9. #9
    Anonymous
    Guest


    Default

    i'm having a similar problem, when i click on checkout it goes to a dead link. how can i fix this?

  10. #10
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default

    When you say dead link, what happens? Error message? Blank screen? 404 page?
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Page 1 of 2 12 LastLast

Similar Threads

  1. Remove product from cart - cart not updating
    By mentalskylight in forum osCommerce 2.2 Installation Help
    Replies: 0
    Last Post: 03-10-2005, 01:42 AM
  2. shopping cart empty error
    By jasonabc in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 12-18-2004, 10:06 PM
  3. Add Item to Cart, authenticate, then deletes cart contents?
    By Anonymous in forum osCmax v1.7 Discussion
    Replies: 8
    Last Post: 07-20-2004, 10:48 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
  •