can anyone help me with this, I've altered this mod and just need a little help to finish it off.
What I've done is provide a return request link from a customers account page, this passes the order id to the Return request page, which fills in the order id for the customer.
I've also added the code below to pull in the items from the order so the customer can select via checkbox which item they want to return.
The problem I am having is looping through the checkboxes when its posted and then adding them to the e-mail sent to the site admin.
Its probably quite simple but my brain is now fried.
Once I've got this sorted I'll post my tweaks as someone may find them useful.
This section get the order id
Code:
<?php if ($_GET['order_id'] != '') {$order_number = $_GET['order_id'];} ?>
<?php if ($_POST['order_id'] != '') {$order_number = $_POST['order_id'];} ?>
<? $orderidnumber = $order_number;?>
This section gets the items from the order
Code:
<li>
<label for="item_name"><?php echo ENTRY_ITEM_NAME . zen_image($template->get_template_dir(RETURN_OPTIONAL_IMAGE, DIR_WS_TEMPLATE, $current_page_base,'images'). '/' . RETURN_OPTIONAL_IMAGE, RETURN_OPTIONAL_IMAGE_ALT, RETURN_OPTIONAL_IMAGE_WIDTH, RETURN_OPTIONAL_IMAGE_HEIGHT); ?></label>
<? global $db;?>
<? $rmaproduct = $db->Execute("SELECT * from " . TABLE_ORDERS_PRODUCTS . " WHERE orders_id = $orderidnumber" );
while (!$rmaproduct ->EOF) {
echo '<input name="item_name" checked="checked" type="checkbox" value="'. $rmaproduct->fields['products_name'] . ' model='. $rmaproduct->fields['products_model'] . '" />'. $rmaproduct->fields['products_name'] . '<br />';
$rmaproduct->MoveNext();
}?>
</li>
Bookmarks