Full migration of front\factory\ — entire directory removed (all 20 classes migrated). ProductRepository +20 frontend methods, PromotionRepository +5 applyType methods, TransportRepository +4 cached methods, PaymentMethodRepository +cached frontend methods. Fix: broken transports_list() in ajax.php replaced with forPaymentMethod(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
469 B
PHP
19 lines
469 B
PHP
<?php
|
|
namespace front\Views;
|
|
|
|
class ShopProduct
|
|
{
|
|
public static function productUrl( $product )
|
|
{
|
|
if ( $product['language']['seo_link'] )
|
|
{
|
|
return '/' . $product['language']['seo_link'];
|
|
}
|
|
|
|
if ( $product['parent_id'] )
|
|
return '/p-' . $product['parent_id'] . '-' . \Shared\Helpers\Helpers::seo( $product['language']['name'] );
|
|
|
|
return '/p-' . $product['id'] . '-' . \Shared\Helpers\Helpers::seo( $product['language']['name'] );
|
|
}
|
|
}
|