List of all shoppers who bought the product in product detail

Started by Tonda24, June 20, 2019, 10:39:09 AM

Previous topic - Next topic

Tonda24

Hello,
List of all shoppers who bought the product in product detail works only with "shipped" status. I cannot change another status or enter all statuses. If I need to find out which order is blocking the goods, I have no chance.
Thanks a lot.

Jörgen

This work as expected since Years.

You give to little info, You have probably an old VM version or restricted access, only You can know that.

What VM version and Joomla version ?

Old install, update, has it ever worked etc ...

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Tonda24

Hello,
thanks for your reply.

VirtueMart 3.4.5 10045
Joomla! 3.9.6

Jörgen

Then please show an example with good screenshots. Because this is workning in a plain vanilla install.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

StefanSTS

The problem is, that regardless of the Status of the product (or the order), the status is always shown as Shipped in 3.4.2.

That looks like a bug in that VM version.

EDIT: No, all is good, the product had the status shipped, different from the order status, see below.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Jörgen

Seems to be working with VM 3.4.2.10057

Make sure You untick (Select some options X). This is annoying though.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

StefanSTS

In VM 3.6.0.10075 that is working fine with a filter for the status.

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Tonda24

This issue was also a problem with previous versions of VM. I don't have the VM version 3.6.0.10075.

Jörgen

What is Your Issue? I can confirm that this work also on 3.2.12. and VM 3.4.2.10057

When stopped this working ? What VM version had this issue ?

The only thing that is annoying is that You get nothing when (Select some options X) is chosen together with other statuses.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

StefanSTS

The latest version will be available here in some time: http://dev.virtuemart.net/projects/virtuemart/files

Maybe the available 10063 got that solved.
Or you go to the SVN and pull the latest files: http://dev.virtuemart.net/projects/virtuemart/files

--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Jörgen

3.4.5.10057 has it working.
3.2.12 has it working, when was it ever an issue ?

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

StefanSTS

I thought it was an issue in 3.4.2.

Looking at it closer, the orders in my case are all Status C confirmed, but the products are with status shipped because of the download plugin I guess.
I never used it before so I didn't know that the status of the product was different compared to the order status.

So actually the list seems doing exactly what is should do.

@Tonda, you might want to check your browser console for errors when you try to add or change a status.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

Jörgen

Ok, that is probably cleared now.
the only issue I see is when You choose all options you also get the option (Select some options X) is also chosen. Unless you untick this you will get no search results. The revenue report gives you search results with this chosen.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

StefanSTS

The list is generated in orderstatus model:

array_unshift adds the empty option to the selection.
Might be a good idea to have another variable like $empty_option in the function:
function renderOSList($value,$name = 'order_status',$multiple=FALSE,$attrs='',$langkey='',$empty_option='yes/no')

There might be a way to ask chosen not to show the empty option.


function renderOSList($value,$name = 'order_status',$multiple=FALSE,$attrs='',$langkey=''){

$idA = $id = $name;
$attrs .= ' class="inputbox" ';
if ($multiple) {
$attrs .= ' multiple="multiple" ';
if(empty($langkey)) $langkey = 'COM_VIRTUEMART_DRDOWN_SELECT_SOME_OPTIONS';
$attrs .=  ' data-placeholder="'.vmText::_($langkey).'"';
$idA .= '[]';
} else {
if(empty($langkey)) $langkey = 'COM_VIRTUEMART_LIST_EMPTY_OPTION';
}

if(is_array($value)){
$hashValue = implode($value);
} else {
$hashValue = $value;
}

$hash = md5($hashValue.$name.$attrs);
if (!isset($this->_renderStatusList[$hash])) {
$orderStates = $this->getOrderStatusNames();
$emptyOption = JHtml::_ ('select.option', -1, vmText::_ ($langkey), 'order_status_code', 'order_status_name');
array_unshift ($orderStates, $emptyOption);
if ($multiple) {
$attrs .=' size="'.count($orderStates).'" ';
}

$this->_renderStatusList[$hash] = JHtml::_('select.genericlist', $orderStates, $idA, $attrs, 'order_status_code', 'order_status_name', $value,$id,true);
}
return $this->_renderStatusList[$hash] ;
}
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.

StefanSTS

I changed the function in models orderstatus.php to


function renderOSList($value,$name = 'order_status',$multiple=FALSE,$attrs='',$langkey='',$empty_opt='TRUE'){

$idA = $id = $name;
$attrs .= ' class="inputbox" ';
if ($multiple) {
$attrs .= ' multiple="multiple" ';
if(empty($langkey)) $langkey = 'COM_VIRTUEMART_DRDOWN_SELECT_SOME_OPTIONS';
$attrs .=  ' data-placeholder="'.vmText::_($langkey).'"';
$idA .= '[]';
} else {
if(empty($langkey)) $langkey = 'COM_VIRTUEMART_LIST_EMPTY_OPTION';
}

if(is_array($value)){
$hashValue = implode($value);
} else {
$hashValue = $value;
}

$hash = md5($hashValue.$name.$attrs);
if (!isset($this->_renderStatusList[$hash])) {
$orderStates = $this->getOrderStatusNames();
if ($empty_opt) {
$emptyOption = JHtml::_ ('select.option', -1, vmText::_ ($langkey), 'order_status_code', 'order_status_name');
array_unshift ($orderStates, $emptyOption);
}
if ($multiple) {
$attrs .=' size="'.count($orderStates).'" ';
}

$this->_renderStatusList[$hash] = JHtml::_('select.genericlist', $orderStates, $idA, $attrs, 'order_status_code', 'order_status_name', $value,$id,true);
}
return $this->_renderStatusList[$hash] ;
}


and in view.html.php of administrator view product I changed line 197 to:


    $lists['OrderStatus'] = $orderstatusModel->renderOSList($order_status,'order_status',TRUE,'','',FALSE);


Works for me. Please test if it bothers you.
--
Stefan Schumacher
www.jooglies.com - VirtueMart Invoice Layouts

Please use only stable versions with even numbers for your live shop! Use Alpha versions only if you know what risk you are taking.