Author Topic: List of all shoppers who bought the product in product detail  (Read 857 times)

Tonda24

  • Beginner
  • *
  • Posts: 3
  • A beginner
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 2460
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: List of all shoppers who bought the product in product detail
« Reply #1 on: June 20, 2019, 10:51:15 am »
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.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

Tonda24

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: List of all shoppers who bought the product in product detail
« Reply #2 on: June 20, 2019, 12:37:42 pm »
Hello,
thanks for your reply.

VirtueMart 3.4.5 10045
Joomla! 3.9.6

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2460
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: List of all shoppers who bought the product in product detail
« Reply #3 on: June 20, 2019, 13:05:08 pm »
Then please show an example with good screenshots. Because this is workning in a plain vanilla install.

Jörgen @ Kreativ Fotografi
Joomla 3.9.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 520
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: List of all shoppers who bought the product in product detail
« Reply #4 on: June 20, 2019, 13:10:02 pm »
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 2460
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: List of all shoppers who bought the product in product detail
« Reply #5 on: June 20, 2019, 13:34:32 pm »
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.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 520
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: List of all shoppers who bought the product in product detail
« Reply #6 on: June 20, 2019, 14:49:53 pm »
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

  • Beginner
  • *
  • Posts: 3
  • A beginner
Re: List of all shoppers who bought the product in product detail
« Reply #7 on: June 20, 2019, 15:00:45 pm »
This issue was also a problem with previous versions of VM. I don't have the VM version 3.6.0.10075.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2460
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: List of all shoppers who bought the product in product detail
« Reply #8 on: June 20, 2019, 15:05:31 pm »
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.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 520
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: List of all shoppers who bought the product in product detail
« Reply #9 on: June 20, 2019, 15:09:07 pm »
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 2460
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: List of all shoppers who bought the product in product detail
« Reply #10 on: June 20, 2019, 15:24:40 pm »
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.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 520
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: List of all shoppers who bought the product in product detail
« Reply #11 on: June 20, 2019, 15:40:55 pm »
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 2460
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: List of all shoppers who bought the product in product detail
« Reply #12 on: June 20, 2019, 15:52:17 pm »
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.8
Virtuemart 3.4.x
Olympiantheme Hera (customized)

StefanSTS

  • Global Moderator
  • Full Member
  • *
  • Posts: 520
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: List of all shoppers who bought the product in product detail
« Reply #13 on: June 20, 2019, 16:47:24 pm »
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.

Code: [Select]
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

  • Global Moderator
  • Full Member
  • *
  • Posts: 520
  • VirtueMart Version: VM 4.2 on Joomla 4.5
Re: List of all shoppers who bought the product in product detail
« Reply #14 on: June 20, 2019, 18:15:57 pm »
I changed the function in models orderstatus.php to

Code: [Select]
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:

Code: [Select]
    $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.