Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/export orders #111

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

Feature/export orders #111

wants to merge 9 commits into from

Conversation

wobqqq
Copy link
Contributor

@wobqqq wobqqq commented Jul 1, 2020

No description provided.

@wobqqq wobqqq linked an issue Jul 1, 2020 that may be closed by this pull request
kharanenka
kharanenka previously approved these changes Jul 2, 2020
'updated_at' => ['label' => 'lovata.toolbox::lang.field.updated_at'],
];

$arPropertyList = (array) DB::table('lovata_orders_shopaholic_addition_properties')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему не использовать модель для запроса?

Copy link
Contributor Author

@wobqqq wobqqq Jul 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

по примеру с импорта брал

@@ -0,0 +1,27 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('lovata/shopaholic/products') ?>"><?= e(trans('lovata.shopaholic::lang.product.list_title')) ?></a></li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Некорректная сслыка

* @property Status $status
* @method static Status|\October\Rain\Database\Relations\BelongsTo status()
*/
class OrderExport extends ExportModel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему нельзя сделать наследование в основном классе?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

а если потом появится импорт заказов?

}

foreach ($arPropertyList as $sField => $sLabel) {
$arFieldList[$sField] = ['label' => $sLabel];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Здесь возможно можно сделать 'property.'.$sField

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

нет. в метод модели будет передоваться просто массив с ключом 'property.field'

@kharanenka kharanenka self-requested a review July 2, 2020 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export orders in EXCEL sheet
3 participants