Skip to content

Commit

Permalink
Check for payment status on downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeos committed Jun 3, 2024
1 parent eac3aa4 commit fc611ff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Client/Html/Account/Download/Standard.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@ protected function checkAccess( string $id = null ) : bool

if( ( $customerId = $context->user() ) !== null && $id !== null )
{
$manager = \Aimeos\MShop::create( $context, 'order/base' );
$manager = \Aimeos\MShop::create( $context, 'order' );

$search = $manager->filter();
$expr = array(
$search->compare( '>=', 'order.statuspayment', \Aimeos\MShop\Order\Item\Base::PAY_RECEIVED ),
$search->compare( '==', 'order.base.customerid', $customerId ),
$search->compare( '==', 'order.base.product.attribute.id', $id ),
);
Expand Down

0 comments on commit fc611ff

Please sign in to comment.