eCommerce Orders

Permalink 1 user found helpful
Hi Guys,

I have been trialing a new payment method in test mode and as a result have a dozen or more orders that I'd like to delete so that I start with a clean sheet when the site goes live.

Any ideas where these orders live? There doesnt seem to be an option in the eCommerce package to delete them unless I'm mistaken.

Your help as always, greatly appreciated.

Thx markmywords

 
mesuva replied on at Permalink Reply
mesuva
To delete an order, you first have to view it in the dashboard and change its status to 'Cancelled'. Right at the bottom of the order is a drop down where you can change the status.

Once you've done that, a delete option/link appears on the order info screen. It's sort of a protective mechanism to stop you deleting an order.

Although it's a bit of a pain to have to delete lots of test orders this way, I think it's preferable to trying to delete them via the database.
markmywords replied on at Permalink Reply
Mesuva,

Thank you for super prompt response! Yes makes sense that its two steps!

C5 forums rock!

Thx mmws
markmywords replied on at Permalink Reply 1 Attachment
But!!!!

If I have failed orders i.e. the order detail is in error (whilst I was configuring the gateway) - the option to set as cancelled is not available.

So do I have to delete these out of the database? If so - where/how do I get rid of these pesky things??

Ive fixed the problem but the attached image should give you some idea of my dilemma when it comes to setting test orders as cancelled.

Thx M
mesuva replied on at Permalink Reply
mesuva
I've come across this a few times. I'm planning to point this out to the concrete5 guys some day, but it's pretty quick to fix in the time being.

Copy:
/packages/core_commerce/elements/orders/detail.php
to
/elements/orders/detail.php
(creating an override).

Then edit the override to look like this:

.....
<tr><td><label><?php echo t('Email')?>:</label></td><td><?php echo $order->getOrderEmail()?></td></tr>
       <?php if ($billing) { ?> 
       <tr><td><label><?php echo t('Address1')?>:</label></td><td><?php echo $billing->getAddress1()?></td></tr>
       <tr><td><label><?php echo t('Address2')?>:</label></td><td><?php echo $billing->getAddress2()?></td></tr>
       <tr><td><label><?php echo t('City')?>:</label></td><td><?php echo $billing->getCity()?></td></tr>
       <tr><td><label><?php echo t('State/Province')?>:</label></td><td><?php echo $billing->getStateProvince()?></td></tr>
       <tr><td><label><?php echo t('Zip/Postal Code')?>:</label></td><td><?php echo $billing->getPostalCode()?></td></tr>
       <tr><td><label><?php echo t('Country')?>:</label></td><td><?php echo $billing->getCountry()?></td></tr>
      <tr><td><label><?php echo t('Phone')?>:</label></td><td><?php echo $order->getAttribute('billing_phone')?></td></tr>
      <?php } ?>
      <?php  if ($bill_attr) {
.....


Then that should get the order page working. Once you've deleted the orders, I'd suggest removing the override, in case the package gets updated in the future.
jamesleech replied on at Permalink Reply 1 Attachment
jamesleech
Tidying up the back end prior to launch - deleting test orders and hit this detail - once again, following your footprints through the backend of Concrete!

Not sure how that edit mentioned here applies - to the whole details.php file (replace all from Line 2 in the code? )
mesuva replied on at Permalink Reply
mesuva
All it is, is the inclusion of an extra if statement to test if $billing is valid.

So don't replace anything, just add the line above the one that includes 'Address1', as per my example:
<?php if ($billing) { ?>


And add this one after the one that includes 'Phone':
<?php } ?>

In other words, it's just an if statement around the 7 lines of the billing address
jamesleech replied on at Permalink Reply 1 Attachment
jamesleech
That certainly stops it locking up - but the system is still being naughty - defaulting to unstyled content.

(see screen grab)

I'll run this by the commerce team
jamesleech replied on at Permalink Reply
jamesleech
This forum has a delete all orders solution

http://www.concrete5.org/marketplace/addons/ecommerce/discussion/cl...

It's like a nuke for your orders department...