Order payment button

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
12 years 10 months ago #34672

Could an extra configuration parameter be added please so that the payment button works in the same way as the cancel order button?

Existing code in order/view.html.php

$default_status = $config->get('order_created_status','created');
foreach($rows as $k => $order){
  if($order->order_status==$default_status){
    $rows[$k]->show_payment_button = true;
  }
}
Suggested alternative:
if( $config->get('payable_order_status','') != '' ) {
  $payable_order_status = explode(',',$config->get('payable_order_status',''));
  foreach($rows as $k => $order){
    if( in_array($order->order_status, $payable_order_status) ){
      $rows[$k]->show_payment_button = true;
    }
  }
}
This will allow the admin if creating their own statii to define which ones the payable button will appear. The default configuration parameter value on installation will be 'created'.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 10 months ago #34718

I can see what you're saying. However it's already complex and users start asking questions about these order statuses options. Adding one more option will yet again make it more complex while the alternative of editing a bit the view for a website which would need that isn't so much of a problem.
I'm not convinced for now

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

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
12 years 10 months ago #34861

Understood.

I was about to say something to bear in mind for the future would be to add a payable / cancellable field to the order status configuration and then leave out the cancellable field in the configuration.

Then realised that the custom category fields apply to all types of categories - including the order statii. So another way of customising this.

However, this is a bit confusing when adding a custom field to a product category as it also appears in the order status and manufacturer configuration screens. Could an option be added to category custom fields so that they only appear / can be used in one place?

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 10 months ago #34873

You can already restrict custom category fields to only some categories with the category option on the right side of the custom field edition screen.

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

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
12 years 10 months ago #34925

I tried that and does not appear to work either as I would expect or in a way which would help in this issue.

In Hikashop demo.
Create custom category field as a single drop-down with 2 values.
Add fashion category and set include sub-categories to Yes.
Set back-end Form and Listing to Yes.

Go to Product Categories and the new custom category field appears in list at top level.
The new custom category field appears regardless of category selected.
I would expect it to appear only for the fashion category and categories below.

Go to System order statuses and the new custom category field appears in list.
Edit an order status and the new custom category field appears.
Looks like a category type select box might be needed when creating a custom category field.
This would link into the category_type column of the hikashop_category table.

Ditto Product Manufacturers.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
12 years 10 months ago #34951

Ah yes, I didn't understand that you were talking about listings.
Indeed that is not taken into account for listings.

We'll look at improving that for next release.

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

  • Posts: 292
  • Thank you received: 5
  • Hikashop Business
12 years 10 months ago #34956

Thanks.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum