what is the point on the order status "created"?

  • Posts: 66
  • Thank you received: 0
12 years 8 months ago #24442

Hi,

I am just testing the program and I've noticed that if I order something and click on the basket, do the check out process and then close the window before paying the order status is marked as "created".

The problem is that if the user go to control panel and click to view orders the order is shown as created but there is no way to finish the order or cancel the order.. so what is the purpose of it?

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 8 months ago #24444

Hi,

First, if you pay by bank transfer, collect on delivery, check or western union, the order will be created and it will be confirmed only when the website owner receives your payment.

Second, in our commercial editions, you can activate the option "Payment of orders not paid immediately" of the config so that users can pay later on via the page of your screenshot.

Please Log in or Create an account to join the conversation.

  • Posts: 66
  • Thank you received: 0
12 years 8 months ago #24448

I see, none of the options apply to me so how do I get rid of this option? I'd like the order not to be showing on the control pannel unless it is paid.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 8 months ago #24450

There is no option for that.

You need to edit the file "listing" of the view "order" of the front end via the menu Display->Views and add some code to skip the display of unconfirmed orders.

Please Log in or Create an account to join the conversation.

  • Posts: 66
  • Thank you received: 0
12 years 8 months ago #24461

Thank you :) I am no PHP ninja, I've just finished reading my first book on the subject but I think the code I wrote sorted the problem (I hope so anyway) I found the table cells where the unwanted data was being called and put the condition:

(Nicolas could you please have a quick look and let me know if you think the code is OK? The created orders have disappeared from the front end as I wanted but I wonder if this will cause problems elsewhere?)

$dominado = $this->order_statuses->trans($row->order_status);
if ($dominado == created)
echo '';
else

here is the code:

<td class="hikashop_order_number_value">
<a href="<?php
/*Code added by Luiza*/
$dominado = $this->order_statuses->trans($row->order_status);
if ($dominado == created)
echo '';
else


echo hikashop_completeLink('order&task=show&cid='.$row->order_id); ?>">
<?php
/*Code added by Luiza*/
$dominado = $this->order_statuses->trans($row->order_status);
if ($dominado == created)
echo '';
else

echo $row->order_number; ?>
</a>
</td>
<td class="hikashop_order_date_value">
<?php
/*Code added by Luiza*/
$dominado = $this->order_statuses->trans($row->order_status);
if ($dominado == created)
echo '';
else

echo hikashop_getDate($row->order_created,'%Y-%m-%d %H:%M');?>
</td>
<td class="hikashop_order_status_value">
<span class="hikashop_order_listing_status">
<?php
/*Code added by Luiza*/
$dominado = $this->order_statuses->trans($row->order_status);
if ($dominado == created)
echo '';
else

echo $this->order_statuses->trans($row->order_status); ?></span>

<?php if(!empty($row->show_payment_button) && bccomp($row->order_full_price,0,5)>0){ ?>



:laugh: I've put in red the code I've added and if someone wants to try it too just keep a copy of the original file (just in case) and delete the code between lines 94 and 101 and paste the code above. If anyone needs help on how to do it just contact me.

Last edit: 12 years 8 months ago by luizarios.

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 8 months ago #24476

You could have just added the line:
if($row->order_status=='created') continue;

after the foreach line of code. It's simpler and cleaner. But your solution is ok too.

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
12 years 7 months ago #25762

Hi,

I too would like to skip the order being created without a purchase being made. I only use paypal and have no need for any other payment methods.

I have searched the above mentioned file, but cannot see where the foreach loop is to insert the code after.

Could you please insert it into the following code and i will paste it into the file.

Thank you.


<?php
/**
* @package HikaShop for Joomla!
* @version 1.5.3
* @author hikashop.com
* @copyright (C) 2010-2011 HIKARI SOFTWARE. All rights reserved.
* @license www.hikashop.com/commercial_license.php
*/
defined('_JEXEC') or die('Restricted access');
?>
<div id="hikashop_order_listing">
<fieldset>
<div class="header hikashop_header_title"><h1><?php echo JText::_('ORDERS');?></h1></div>
<div class="toolbar hikashop_header_buttons" id="toolbar" style="float: right;">
<table class="hikashop_no_border">
<tr>
<td>
<a onclick="javascript:submitbutton('cancel'); return false;" href="#" >
<span class="icon-32-cancel" title="<?php echo JText::_('HIKA_CANCEL'); ?>">
</span>
<?php echo JText::_('HIKA_CANCEL'); ?>
</a>
</td>
</tr>
</table>
</div>
</fieldset>
<div class="iframedoc" id="iframedoc"></div>
<form action="<?php echo hikashop_completeLink('order'); ?>" method="post" name="adminForm">
<table class="hikashop_no_border">
<tr>
<td width="100%">
<?php echo JText::_( 'FILTER' ); ?>:
<input type="text" name="search" id="hikashop_search" value="<?php echo $this->escape($this->pageInfo->search);?>" class="inputbox" onchange="document.adminForm.submit();" />
<button onclick="this.form.submit();"><?php echo JText::_( 'GO' ); ?></button>
<button onclick="document.getElementById('hikashop_search').value='';this.form.submit();"><?php echo JText::_( 'RESET' ); ?></button>
</td>
</tr>
</table>
<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="ctrl" value="<?php echo JRequest::getCmd('ctrl'); ?>" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $this->pageInfo->filter->order->value; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $this->pageInfo->filter->order->dir; ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<table class="hikashop_orders adminlist" cellpadding="1">
<thead>
<tr>
<th class="hikashop_order_num_title title titlenum" align="center">
<?php echo JText::_( 'HIKA_NUM' );?>
</th>
<th class="hikashop_order_number_title title" align="center">
<?php echo JText::_('ORDER_NUMBER'); ?>
</th>
<th class="hikashop_order_date_title title" align="center">
<?php echo JHTML::_('grid.sort', JText::_('DATE'), 'a.order_created', $this->pageInfo->filter->order->dir,$this->pageInfo->filter->order->value ); ?>
</th>
<th class="hikashop_order_status_title title" align="center">
<?php echo JHTML::_('grid.sort', JText::_('ORDER_STATUS'), 'a.order_status', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
</th>
<th class="hikashop_order_total_title title" align="center">
<?php echo JHTML::_('grid.sort', JText::_('HIKASHOP_TOTAL'), 'a.order_full_price', $this->pageInfo->filter->order->dir, $this->pageInfo->filter->order->value ); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="10">
<div class="pagination">
<?php echo $this->pagination->getListFooter(); ?>
<?php echo $this->pagination->getResultsCounter(); ?>
</div>
</td>
</tr>
</tfoot>
<tbody>
<?php
$k = 0;
for($i = 0,$a = count($this->rows);$i<$a;$i++){
$row =& $this->rows[$i];
?>
<tr class="<?php echo "row$k"; ?>">
<td class="hikashop_order_num_value">
<?php echo $this->pagination->getRowOffset($i);
?>
</td>
<td class="hikashop_order_number_value">
<a href="<?php echo hikashop_completeLink('order&task=show&cid='.$row->order_id); ?>">
<?php echo $row->order_number; ?>
</a>
</td>
<td class="hikashop_order_date_value">
<?php echo hikashop_getDate($row->order_created,'%Y-%m-%d %H:%M');?>
</td>
<td class="hikashop_order_status_value">
<span class="hikashop_order_listing_status">
<?php
echo $this->order_statuses->trans($row->order_status); ?></span>
<?php if(!empty($row->show_payment_button) && bccomp($row->order_full_price,0,5)>0){ ?>
<form action="<?php echo hikashop_completeLink('order'); ?>" method="post" name="adminForm_<?php $row->order_id; ?>">
<?php
if($this->payment_change){
$text = JText::_('PAY_NOW');
$this->payment->order = $row;
$this->payment->preload(false);
echo $this->payment->display('new_payment_method',$row->order_payment_method,$row->order_payment_id,false);
}else{
$text = JText::sprintf('PAY_WITH_X',$this->payment->getName($row->order_payment_method,$row->order_payment_id));
}
echo $this->cart->displayButton($text,'pay',$this->params,hikashop_completeLink('order&task=pay&order_id='.$row->order_id),'document.adminForm_'.$row->order_id.'.submit();return false;','class="hikashop_order_pay_button"'); ?>
<input type="hidden" name="option" value="<?php echo HIKASHOP_COMPONENT; ?>" />
<input type="hidden" name="task" value="pay" />
<input type="hidden" name="order_id" value="<?php echo $row->order_id; ?>" />
<input type="hidden" name="ctrl" value="<?php echo JRequest::getCmd('ctrl'); ?>" />
<?php echo JHTML::_( 'form.token' ); ?>
</form>
<?php } ?>
</td>
<td class="hikashop_order_total_value">
<?php echo $this->currencyHelper->format($row->order_full_price,$row->order_currency_id);?>
</td>
</tr>
<?php
$k = 1-$k;
}
?>
</tbody>
</table>
</div>
<div class="clear_both"></div>

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 7 months ago #25765

After the lines:
for($i = 0,$a = count($this->rows);$i<$a;$i++){
$row =& $this->rows[$i];

Please Log in or Create an account to join the conversation.

  • Posts: 4
  • Thank you received: 0
12 years 7 months ago #25821

Thanks,

The code has been inserted into the correct place.

The item still comes through as a created item even though payment has not been followed through.

Any ideas?

Thankyou

Please Log in or Create an account to join the conversation.

  • Posts: 81540
  • Thank you received: 13071
  • MODERATOR
12 years 7 months ago #25822

Indeed, that code doesn't prevent the orders from being created. What it does is that it doesn't display them on the user orders listing on the front end.

It's not possible to not create the order before the payment is made with paypal standard. HikaShop needs to create the order before redirecting to paypal so that it can then associate the payment notification with the order when receiving the payment notification from paypal.
If you wish to not have the order created before the payment is done, you will have to host the payment process with paypal pro or something similar. Beware that in that case, you will need a SSL certificate setup on your website to secure the transaction.

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum