Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    Join Date
    Sep 2012
    Posts
    253
    Plugin Contributions
    0

    Default Re: Need simple PHP help

    Quote Originally Posted by mespe View Post
    As it stands, I have no idea what someone puts in their cart. If I knew this, I would know what kind of Mercedes they owned and will need parts for.
    So if I am reading this correctly you don't want a pop up window necessarily you would like the system to collect the customer's information and what they removed from the shopping cart and have that information either saved to the database so you can run a report or have it emailed to you. This way there is no intrusion into the customer's shopping experience but you still get the data you want.

  2. #12
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Need simple PHP help

    Quote Originally Posted by mespe View Post
    funny thing you should post a link to the website I've spent the last hour on
    It's a site I (and many others) spend a lot of time on especially when trying to learn new code. They try to keep things simple and they provide a lot of example code. If you find the textual examples a little difficult to understand/follow the 'Try me' links provide working examples.

    Quote Originally Posted by mespe View Post
    So needless to say I have no earthly idea where to put what in the code.
    The javascript can be placed in any one of several places.
    http://www.w3schools.com/js/js_whereto.asp

    The 'event' to execute the code would be added to your input/submit button (in your case the 'delete from cart' button).
    http://www.w3schools.com/js/js_events.asp

    Cheers
    RodG

  3. #13
    Join Date
    Sep 2014
    Location
    ohio
    Posts
    216
    Plugin Contributions
    0

    Default Re: Need simple PHP help

    Quote Originally Posted by southshorepizza View Post
    So if I am reading this correctly you don't want a pop up window necessarily you would like the system to collect the customer's information and what they removed from the shopping cart and have that information either saved to the database so you can run a report or have it emailed to you. This way there is no intrusion into the customer's shopping experience but you still get the data you want.
    No, I want the user to
    1) tell me why they removed the item, if they choose to (this is after click on checkout, or the paypal button only)
    2) Be able to decline and close pop up
    3) or check a "Never see this request again" checkbox and close pop-up

    But a less intrusive approach might be in order, such as what you suggest, I run a report, the report contains the item removed from the cart and the userid, when possible.

  4. #14
    Join Date
    Sep 2012
    Posts
    253
    Plugin Contributions
    0

    Default Re: Need simple PHP help

    Insert within the if ($product['buttonDelete']){ area.
    if ($product['buttonDelete']) says that if using this button do what is inside the { }

    includes/templates/template_default/templates/tpl_shopping_cart_default.php

    Code:
    <?php
      if ($product['buttonDelete']) {
    ?>
               <a href="<?php echo zen_href_link(FILENAME_SHOPPING_CART, 'action=remove_product&product_id=' . $product['id']); ?>"><?php echo zen_image($template->get_template_dir(ICON_IMAGE_TRASH, DIR_WS_TEMPLATE, $current_page_base,'images/icons'). '/' . ICON_IMAGE_TRASH, ICON_TRASH_ALT); ?></a>
    <?php
      }
      if ($product['checkBoxDelete'] ) {
        echo zen_draw_checkbox_field('cart_delete[]', $product['id']);
      }
    ?>

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. I thought this would be simple. I need help.
    By bcannon in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 24 Mar 2010, 03:38 PM
  2. A simple .php code question? Please help!
    By triplemoonranch in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 24 Feb 2008, 01:55 AM
  3. need simple php coding help!!!! 5 lines max..
    By waghelak in forum General Questions
    Replies: 4
    Last Post: 10 Sep 2007, 02:59 AM
  4. Need help with simple FAQ
    By starcad in forum General Questions
    Replies: 0
    Last Post: 11 Aug 2007, 07:16 PM
  5. Simple changes need help pelase...
    By jas99villa in forum Basic Configuration
    Replies: 4
    Last Post: 1 Feb 2007, 07:18 PM

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