Page 61 of 65 FirstFirst ... 11515960616263 ... LastLast
Results 601 to 610 of 649
  1. #601
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: Return Authorization Module (RMA)

    Indeed.. regarding item #4.. I think that what would be better and keep folks out of the code is to add this to the admin menu where folks can select from existing statuses in their store. This would keep folks "out of the code" and make it easier to implement.. I know the change to make in the install SQL to add this option..

    something like this should do the trick:
    Code:
    INSERT INTO configuration VALUES (NULL, 'Auto Status - RMA', 'AUTO_STATUS_RMA', '2', 'Number of the order status assigned when an RMA is submitted.', @t4, 5, now(), now(), 'zen_get_order_status_name', 'zen_cfg_pull_down_order_statuses(');
    Not so sure what the code below have to look like to use the selected status.. HELP!!

    Quote Originally Posted by rbarbour View Post
    So many changes - for the better, Yes?

    1> I re-wrote the code to do-away with the random 3 digit numbers and added customer id in its place.

    2> I added a hidden input field to the stores returns page for the RMA#

    3> I added the RMA# to the email

    4> I added a sql query to the success page to update the order status via admin (),
    I am thinking this should have a ADMIN control where the status_id can be entered for all sites will differ depending on how many order statuses they currently have.

    Here is the UPDATED and at the moment FINAL CODE

    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');
    define('BUTTON_RMA_REQUEST_ALT''Request an RMA#'); 
    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>

    ADD:
    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:
        $order_number zen_db_prepare_input($_POST['order_number']); 
    below that ADD:
    PHP Code:
        $rma_number zen_db_prepare_input($_POST['rma_number']); 
    then find:
    PHP Code:
    "Order Number:" "\t" $order_number "<br />" 
    below that ADD:
    PHP Code:
    "RMA Number:" "\t" $rma_number "<br />" 
    then find:
    zen_redirect(zen_href_link(FILENAME_RETURNS, 'action=success'));

    CHANGE TO:

    PHP Code:
          zen_redirect(zen_href_link(FILENAME_RETURNS'action=success' '&order_id=' $order_number)); 
    then find:
    PHP Code:
      $city $check_customer->fields['entry_city']; 
    below that ADD:
    PHP Code:
    $cID $check_customer->fields['customers_id']; 
    then find:
    PHP Code:
      $postcode $check_customer->fields['entry_postcode'];

    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'];
    $rma_request_date date('mdY');
    $rma_number $order_number TEXT_SUCCESS_DASH $cID TEXT_SUCCESS_DASH $rma_request_date
    Now in /includes/templates/YOUR_TEMPLATE_NAME/templates/tpl_returns_default.php
    find:
    PHP Code:
    <?php if (RETURN_STORE_NAME_ADDRESS == 'true') { ?>
    <address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
    <?php ?>

    <?php
      
    if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
    ?>

    <br class="clearBoth" />
    <div class="mainContent success"><?php echo TEXT_SUCCESS?></div>

    <?php
      
    } else {
    ?>
    CHANGE TO:
    PHP Code:
    <?php if (RETURN_STORE_NAME_ADDRESS == 'true' && ($_GET['action'] == 'success')) { ?>
    <?php
    /**
    show nothing
     */
    } else if (RETURN_STORE_NAME_ADDRESS == 'true') { ?>
    <address><?php echo nl2br(STORE_NAME_ADDRESS); ?></address>
    <?php ?>

    <?php
      
    if (isset($_GET['action']) && ($_GET['action'] == 'success')) {
    ?>
    <br class="clearBoth" />

    <div class="mainContent success">
    <?php echo '<div id="returnSuccess">' TEXT_SUCCESS '</div>' '<div id="returnRequired">'TEXT_SUCCESS_RMA_REQUIRED '</div>' '<div id="returnPolicy">'TEXT_SUCCESS_RMA_POLICY_BOF '<a href="' zen_href_link(FILENAME_SHIPPING'''SSL') . '">' TEXT_SUCCESS_RMA_POLICY_LINK '</a>' TEXT_SUCCESS_RMA_POLICY_EOF '</div>' '<div id="returnAddressWrapper">' '<div id="returnRMA">' TEXT_SUCCESS_RMA_ID $rma_number '</div>' '<div id="returnAddress">' TEXT_SUCCESS_RMA_RETURN_ADDRESS '</div>'; if (RETURN_STORE_NAME_ADDRESS == 'true') { echo '<address>' nl2br(STORE_NAME_ADDRESS) . '</address>'; } echo '<div id="returnPhone">' TEXT_SUCCESS_RMA_RETURN_PHONE '</div>' '</div>'?>

    <?php
    $orderID 
    $_GET['order_id'];
    $db->Execute("update " TABLE_ORDERS " set orders_status = '5', last_modified = now() where orders_id = '" . (int)$orderID "'");
    ?>
    <?php
      
    } else {
    ?>
    The Number 5 represents the order status ID in ADMIN > LOCALIZATION > ORDERS STATUS

    ADD "Pending Return", look at your browser page link - you will see oID=#, that # needs to replace the above 5


    then find:
    PHP Code:
    <br class="clearBoth" />
    <?php
      
    if (RETURN_ITEM_NAME == 'true') {
    ?>
    ABOVE the <br class="clearBoth" />
    ADD:
    PHP Code:
    <?php  echo '<input type="hidden" name="rma_number" value="'.$rma_number.'">'?>
    then open /includes/languages/english/YOUR_TEMPLATE_NAME/returns.php
    DID NOT CHANGE FROM PREVIOUS POSTS

    PHP Code:
    define('TEXT_SUCCESS''Your request has been successfully submitted.');
    define('TEXT_SUCCESS_RMA_REQUIRED''The below RMA# is required for all Returns');
    define('TEXT_SUCCESS_RMA_POLICY_BOF''You can view our ');
    define('TEXT_SUCCESS_RMA_POLICY_LINK''Returns Policy');
    define('TEXT_SUCCESS_RMA_POLICY_EOF'' here.');
    define('TEXT_SUCCESS_RMA_ID''Your RMA# is: ');
    define('TEXT_SUCCESS_DASH''-');
    define('TEXT_SUCCESS_RMA_RETURN_ADDRESS''Please ship all returns to this address:');
    define('TEXT_SUCCESS_RMA_RETURN_PHONE''Phone: 1.111.111.1111'); 
    and the CSS rules can be added to /includes/templates/YOUR_TEMPLATE_NAME/css/returns.css
    DID NOT CHANGE FROM PREVIOUS POSTS

    Code:
    div#returnAddressWrapper {border:1px solid #E9E9E9;background:#FFE573;text-align:center;} div#returnSuccess {font-size:1.2em;padding:5px;color:#606060;} div#returnAddressWrapper, div#returnRequired, div#returnPolicy, div#returnRMA, div#returnAddress, div#returnPhone {font-size:1.5em;font-weight:bold;padding:5px; } div#returnRequired, div#returnAddress {color:#FF0000;}
    I hope this helps and I haven't completely confused everyone.
    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.

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

    Default Re: Return Authorization Module (RMA)

    <?php
    $autoRMA = AUTO_STATUS_RMA;
    $orderID = $_GET['order_id'];
    $db->Execute("update " . TABLE_ORDERS . " set orders_status = $autoRMA, last_modified = now() where orders_id = '" . (int)$orderID . "'");
    ?>

  3. #603
    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 rbarbour View Post
    <?php
    $autoRMA = AUTO_STATUS_RMA;
    $orderID = $_GET['order_id'];
    $db->Execute("update " . TABLE_ORDERS . " set orders_status = $autoRMA, last_modified = now() where orders_id = '" . (int)$orderID . "'");
    ?>
    Now we're cookin' with Crisco!!! I'll bundle this up and submit.. BTW.. If I haven't said it... you're awesome. Been stalking..err.. I mean watching all the helpful stuff you've been posting.. good stuff..
    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.

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

    Default Re: Return Authorization Module (RMA)

    Believe it or not, I do allot if searching and reading to "mainly" find easy and simple solution to incorporate into client websites to efficiently create the functions they require to successfully operate their e-commerce website.

    Along the way, I add my two cents and if I think an idea or suggestion will enhance zen cart functionality for the vast majority, I will take the time to help make it work (where I can). Their are far more knowledgeable on this forum than I.

    And thank you, it is good to hear a fellow contributor appreciate another.

    Now stop stalking me, I mean watching. JUST KIDDING

  5. #605
    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 rbarbour View Post
    And thank you, it is good to hear a fellow contributor appreciate another.

    Now stop stalking me, I mean watching. JUST KIDDING
    I will not I will not I will not!!!
    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.

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

    Default Re: Return Authorization Module (RMA)

    Glad that you were able to use all my rough code and ideas and turn them into useful code for others to use.

    I noticed a problem,
    when it is set to allow logged-in users only it works fine.
    When not logged in it will not show the order_id or customer_id in the email, and no customer_id in the success page.

    Now in my case I take phone orders and I don't add that customer to zen cart. But if a phone customer wants to return
    an item I send them to the RMA form. Of course they don't have a customer number.

    So I changed the following line in tpl_returns_default.php

    Code:
    '<div id="returnRMA">' . TEXT_SUCCESS_RMA_ID . $rma_number . '</div>'
    To:

    Code:
    '<div id="returnRMA">' . TEXT_SUCCESS_RMA_ID; $order_number = $_GET['order_id']; echo $order_number . TEXT_SUCCESS_DASH . $cID . TEXT_SUCCESS_DASH . date('mdY') . '</div>'
    And added:
    Code:
    <?php  echo '<input type="hidden" name="cID" value="'.$cID.'">'; ?>
    Just under this line:
    Code:
    <?php  echo '<input type="hidden" name="rma_number" value="'.$rma_number.'">'; ?>


    In: header_php.php I added

    Code:
       // Prepare extra-info details
               // Admin email returned after submission
        $extra_info = email_collect_extra_info($name, $email_address, $customer_name, $customer_email, $telephone);
        // Prepare Text-only portion of message
    	$text_message = OFFICE_FROM . "\t" . $name . "\n<br />" . 
    		    OFFICE_EMAIL . "\t" . $email_address . "\n<br />" .
    			"Phone Number:" . "\t" .$telephone . "\n<br />" .
    		    "Address:" . "\t" . $address . "\n<br />" .
    		    "City:" . "\t" . $city . "\n<br />" .
    			"State:" . "\t" . $state . "\n<br />" .
    		    "Post Code:" . "\t" . $postcode . "\n<br />" .
    			"Country:" . "\t" . $country . "\n<br />" .
    		    "Order Number:" . "\t" . $order_number . "\n<br />" .
    		    "Customer ID:" . "\t" . $cID . "\n<br />" .
    		    "Total Value:" . "\t" . $value . "\n<br />" .
    		    "Number of Items:" . "\t" . $item_number . "\n<br />"	.
    		    "Item(s) Name:" . "\t" . $item_name . "\n<br />"	.
    		    "Action Requested:" . "\t" . $action . "\n\n<br />"	.
    		     "RMA Number:" . "\t" . $order_number  . "-". $cID . "-". date('mdY') . "\n<br />" .                   
    			'------------------------------------------------------<br />' .
                       "\n\n<br />Reason:".    "\n\n<br />" .
                       "" . $reason .   "\n\n<br />" .
    
                      '------------------------------------------------------<br />' .  
          "" . "\n<br />" . 
         // Stop admin email
         // Begin customer email returned after submission
          $extra_info['TEXT'];
          $email_text = sprintf(EMAIL_GREET_NONE, $name );
          $email_text .=  "\n <br />";
          $email_text .=  EMAIL_WELCOME;
          $email_text .=  "\n\n" . "Request Date:" . "\t" . date('m/d/Y') . "<br />" ;
          $email_text .=  "\n" . "Customer ID:" . "\t" . $cID . "\n<br />";
          $email_text .=  "\n" . "Invoice Number:" . "\t" . $order_number . "<br />" ;
          $email_text .=  "\n" . "Item(s)You Are Returning:" ."\n (as you entered it)" . "\t" . $item_name . "\n\n<br />";
          $email_text .=  "\n" . "RMA Number:" . "\t" . $order_number  . "-". $cID . "-". date('mdY') . "\n<br />";
          $email_text .= "\n\n" . EMAIL_TEXT . "<br />";
          $email_text .= "\n" . EMAIL_CONTACT . "<br />";
          $email_text .= "\n" . EMAIL_WARNING. "\n<br />";
    At the bottom of header_php.php

    I removed this line
    Code:
    $rma_number = $order_number . TEXT_SUCCESS_DASH . $cID . TEXT_SUCCESS_DASH . $rma_request_date;
    and added this line in it's place
    Code:
    $rma_number = $order_number . TEXT_SUCCESS_DASH . $rma_request_date;
    it is just my idea of a work around, maybe you have something better?

    Now when not logged in, the rma looks like this (2 dashes in center, missing customer_id)
    Your RMA# is: 2425--04292013 and has the order_id in the email.

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

    Default Re: Return Authorization Module (RMA)

    Quote Originally Posted by DivaVocals View Post
    Now we're cookin' with Crisco!!! I'll bundle this up and submit.. BTW.. If I haven't said it... you're awesome. Been stalking..err.. I mean watching all the helpful stuff you've been posting.. good stuff..
    Was this ever packaged and submitted?

  8. #608
    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 rbarbour View Post
    Was this ever packaged and submitted?
    It's on my plan for this Friday when I am working from home.. I actually have three add-ons to update and upload..
    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.

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

    Default Re: Return Authorization Module (RMA)

    Quote Originally Posted by DivaVocals View Post
    It's on my plan for this Friday when I am working from home.. I actually have three add-ons to update and upload..
    I made a few changes per the "glitch" xspresso found if customer is not logged in. I will try to post it here today, been so busy lately.

  10. #610
    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 rbarbour View Post
    I made a few changes per the "glitch" xspresso found if customer is not logged in. I will try to post it here today, been so busy lately.
    Tell me about it.. Cool.. I'll wait for you new code..
    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.

 

 
Page 61 of 65 FirstFirst ... 11515960616263 ... 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

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