Page 1 of 2 12 LastLast
Results 1 to 10 of 649

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Posts
    86
    Plugin Contributions
    1

    Default Re: Return Authorization Module (RMA)

    Hi clydejones

    I add a link from the customers account page, so on page tpl_account_default.php where a customer can view their orders, next to the view button there is a "return request button", clicking this button sends the customer (with the order_id in the url) to the return request page.


    This is the code for the tpl_account_default.php page

    The extra code is <th scope="col"><?php echo TABLE_HEADING_RMA; ?></th> which adds the column header

    and

    <td width="120px"><?php echo '<a href="' . zen_href_link(FILENAME_RETURNS, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_RMA_SMALL, BUTTON_RMA_SMALL_ALT) . '</a>'; ?></td>

    which builds the link using the zen button scheme


    Code:
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="prevOrders">
    <caption><h2><?php echo OVERVIEW_PREVIOUS_ORDERS; ?></h2></caption>
        <tr class="tableHeading">
        <th scope="col"><?php echo TABLE_HEADING_DATE; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_ORDER_NUMBER; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_SHIPPED_TO; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_STATUS; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_TOTAL; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_VIEW; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_RMA; ?></th>
      </tr>
    <?php
      foreach($ordersArray as $orders) {
    ?>
      <tr>
        <td width="80px"><?php echo zen_date_short($orders['date_purchased']); ?></td>
        <td width="40px"><?php echo TEXT_NUMBER_SYMBOL . $orders['orders_id']; ?></td>
        <td  align="center"><address><?php echo zen_output_string_protected($orders['order_name']) . '<br />' . $orders['order_country']; ?></address></td>
        <td width="80px"><?php echo $orders['orders_status_name']; ?></td>
        <td width="80px" align="right"><?php echo $orders['order_total']; ?></td>
        <td align="center"><?php echo '<a href="' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_VIEW_SMALL, BUTTON_VIEW_SMALL_ALT) . '</a>'; ?></td>
        <td width="120px"><?php echo '<a href="' . zen_href_link(FILENAME_RETURNS, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_RMA_SMALL, BUTTON_RMA_SMALL_ALT) . '</a>'; ?></td>
      </tr>
    <?php
      }
    ?>
    </table>

  2. #2
    Join Date
    Sep 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Return Authorization Module (RMA)

    Quote Originally Posted by steveyork136 View Post
    Hi clydejones

    I add a link from the customers account page, so on page tpl_account_default.php where a customer can view their orders, next to the view button there is a "return request button", clicking this button sends the customer (with the order_id in the url) to the return request page.


    This is the code for the tpl_account_default.php page

    The extra code is <th scope="col"><?php echo TABLE_HEADING_RMA; ?></th> which adds the column header

    and

    <td width="120px"><?php echo '<a href="' . zen_href_link(FILENAME_RETURNS, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_RMA_SMALL, BUTTON_RMA_SMALL_ALT) . '</a>'; ?></td>

    which builds the link using the zen button scheme


    Code:
    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="prevOrders">
    <caption><h2><?php echo OVERVIEW_PREVIOUS_ORDERS; ?></h2></caption>
        <tr class="tableHeading">
        <th scope="col"><?php echo TABLE_HEADING_DATE; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_ORDER_NUMBER; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_SHIPPED_TO; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_STATUS; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_TOTAL; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_VIEW; ?></th>
        <th scope="col"><?php echo TABLE_HEADING_RMA; ?></th>
      </tr>
    <?php
      foreach($ordersArray as $orders) {
    ?>
      <tr>
        <td width="80px"><?php echo zen_date_short($orders['date_purchased']); ?></td>
        <td width="40px"><?php echo TEXT_NUMBER_SYMBOL . $orders['orders_id']; ?></td>
        <td  align="center"><address><?php echo zen_output_string_protected($orders['order_name']) . '<br />' . $orders['order_country']; ?></address></td>
        <td width="80px"><?php echo $orders['orders_status_name']; ?></td>
        <td width="80px" align="right"><?php echo $orders['order_total']; ?></td>
        <td align="center"><?php echo '<a href="' . zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_VIEW_SMALL, BUTTON_VIEW_SMALL_ALT) . '</a>'; ?></td>
        <td width="120px"><?php echo '<a href="' . zen_href_link(FILENAME_RETURNS, 'order_id=' . $orders['orders_id'], 'SSL') . '"> ' . zen_image_button(BUTTON_IMAGE_RMA_SMALL, BUTTON_RMA_SMALL_ALT) . '</a>'; ?></td>
      </tr>
    <?php
      }
    ?>
    </table>


    Hello

    Can anyone tell me why this code does NOT return the Order ID to the RMA form?

  3. #3
    Join Date
    Sep 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Return Authorization Module (RMA)

    I separated the submit rma page from the success page.
    I added a generated RMA number.
    I would really like the invoice number included in that rma generation.
    When the customer is logged in, they can click a button next to their "view" order button
    in "View Account".
    This should immediately forward you to the rma form with all your personal info fields populated.

    Including your invoice order number.
    It does carry in the url:
    /index.php?main_page=returns&order_id=105308
    But does not fill the order number field.

    I will post all my upgrades once this is solved. Can anyone help solve this?
    Click image for larger version. 

Name:	RMA1.png 
Views:	39 
Size:	21.2 KB 
ID:	12375Click image for larger version. 

Name:	RMA2.gif 
Views:	45 
Size:	12.3 KB 
ID:	12376

  4. #4
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Return Authorization Module (RMA)

    1. look at the returns page header_php.php file to see how it auto generates name, email, phone, ect.

    2. look at the code for account > history info

    just a suggestion and may lead you in the right direction

  5. #5
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Return Authorization Module (RMA)

    So this was pretty easy and it's a great function.

    1.) lets create a button
    1.A) /includes/languages/english/YOUR_TEMPLATE_NAME/button_names.php

    add:
    PHP Code:
    define('BUTTON_RMA_REQUEST''button_rma_request.png'); <-- Name of your button
    define
    ('BUTTON_RMA_REQUEST_ALT''Request an RMA'); <-- You buttons ALT (alternative text
    1.b) upload your button
    /includes/templates/YOUR_TEMPLATE_NAME/buttons/english

    2. lets add the button to the My Account > History > Order Info page
    2.A) /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_account_history_info_default.php

    I added my button at the end of the file right after the <br class="clearBoth" /> and closing </div>

    PHP Code:
    <div class="rmaRequestButton"><?php echo '<a href="' zen_href_link(FILENAME_RETURNS, (isset($_GET['page']) ? 'page=' $_GET['page'] . '&' '') . 'order_id=' $_GET['order_id'], 'SSL') . '">' zen_image_button(BUTTON_RMA_REQUEST) . '</a>'?></div>
    3.) /includes/modules/pages/returns/header_php.php

    find:
    PHP Code:
    if (REGISTERED_RETURN == 'true'){
      if (!
    $_SESSION['customer_id']) {
        
    $_SESSION['navigation']->set_snapshot();
        
    zen_redirect(zen_href_link(FILENAME_LOGIN'''SSL'));
      }

    right below that add:
    PHP Code:
    if (!isset($_GET['order_id']) || (isset($_GET['order_id']) && !is_numeric($_GET['order_id']))) {
      
    zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY'''SSL'));

    towards the bottom find:
    PHP Code:
      $city $check_customer->fields['entry_city']; 
    right below that add:
    PHP Code:
    $customer_info_query "SELECT customers_id
                            FROM   " 
    TABLE_ORDERS "
                            WHERE  orders_id = :ordersID"
    ;

    $customer_info_query $db->bindVars($customer_info_query':ordersID'$_GET['order_id'], 'integer');
    $customer_info $db->Execute($customer_info_query);

    $order_number $_GET['order_id']; 
    Thats it, now your customers "Order Number" text field on the returns page will be pre-populated by the order_id from within the My Account > History > Order Info page

    Enjoy!

  6. #6
    Join Date
    Sep 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Return Authorization Module (RMA)

    Hi everyone,

    rbarbour thank you very much. I will add that once I figure out why my page goes blank.

    I hate to say it but it happened again, my "index.php?main_page=returns" page comes back blank.

    Now I know I made a lot of changes but as before I rolled back my changes... nothing.
    I deleted the entire script, removed all mysql entries.

    Re-installed DivaVocals update (3.1) the database installed, double checked the database, all there...but still nothing just a blank page

    The strange part is when I delete "returns.php" my "index.php?main_page=returns" page returns (no longer blank, just like 2.33 did).
    But it is not reading the english file, the php is what is showing ie; ENTRY_REASON_TEXT etc

    the only mod is fast and easy checkout 1.10.0

    Thanks

  7. #7
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Return Authorization Module (RMA)

    Quote Originally Posted by xspresso View Post
    Hi everyone,

    rbarbour thank you very much. I will add that once I figure out why my page goes blank.

    I hate to say it but it happened again, my "index.php?main_page=returns" page comes back blank.

    Now I know I made a lot of changes but as before I rolled back my changes... nothing.
    I deleted the entire script, removed all mysql entries.

    Re-installed DivaVocals update (3.1) the database installed, double checked the database, all there...but still nothing just a blank page

    The strange part is when I delete "returns.php" my "index.php?main_page=returns" page returns (no longer blank, just like 2.33 did).
    But it is not reading the english file, the php is what is showing ie; ENTRY_REASON_TEXT etc

    the only mod is fast and easy checkout 1.10.0

    Thanks
    Blank page = error log.. can't GUESS why you are getting a blank page.. post the results of the error log..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  8. #8
    Join Date
    Sep 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Return Authorization Module (RMA)

    Hello and thank you for your efforts.

    There are a few items that I would like to change, the page returns to the view history in my account,
    can we add an if else or something to the code below to send it to "success" after submission.

    if (!isset($_GET['order_id']) || (isset($_GET['order_id']) && !is_numeric($_GET['order_id']))) {
    zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, '', 'SSL'));
    }
    if (isset($_GET['action']) && ($_GET['action'] == 'success')) {

    Also:
    Since the code you wrote is not used during success, the order_number will not show in success (i guess) without calling it from the database from within success?



    P.S. my page was blank because I guess I have fat fingers and added an extra ' to the returns.php

  9. #9
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Return Authorization Module (RMA)

    Quote Originally Posted by xspresso View Post
    Hello and thank you for your efforts.

    There are a few items that I would like to change, the page returns to the view history in my account,
    can we add an if else or something to the code below to send it to "success" after submission.

    if (!isset($_GET['order_id']) || (isset($_GET['order_id']) && !is_numeric($_GET['order_id']))) {
    zen_redirect(zen_href_link(FILENAME_ACCOUNT_HISTORY_INFO, '', 'SSL'));
    }
    if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
    If you remove that code all together, it will produce the success page after the form is submitted.

  10. #10
    Join Date
    Feb 2010
    Posts
    2,159
    Plugin Contributions
    17

    Default Re: Return Authorization Module (RMA)

    1.) Disregard my previous posts for I did not test thoroughly with @DivaVocals updated version.

    2.) I actually installed the new version but did not test it (jumped the gun), but when I did (without any alterations), I am getting the send button on the success page (I am getting the success page) and no email being sent.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Flexible Return Authorization (RMA) for ZC v1.5.x [Support Thread]
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 167
    Last Post: 11 Apr 2021, 08:56 PM
  2. Return Authorization Module
    By itspec in forum All Other Contributions/Addons
    Replies: 13
    Last Post: 10 Feb 2009, 11:29 PM
  3. Return Merchandise Authorization (RMA) Module Follow-up
    By killertofu in forum Managing Customers and Orders
    Replies: 1
    Last Post: 11 Aug 2008, 11:13 PM
  4. Return Authorization Module (RMA)
    By dscott1966 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 11 Nov 2006, 08:04 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