2 Commits

Author SHA1 Message Date
6556ba0f88 Fix links to products. 2026-01-28 08:33:22 +01:00
6da4f4257e Fix links to products. 2026-01-28 08:31:41 +01:00
4 changed files with 4 additions and 4 deletions

View File

@@ -112,7 +112,7 @@ class Migrate extends Command
'productsUrl' => 'https://uk.ryobitools.eu/api/product-listing/get-products', 'productsUrl' => 'https://uk.ryobitools.eu/api/product-listing/get-products',
'cultureCode' => 'en-GB', 'cultureCode' => 'en-GB',
'currency' => 'GBP', 'currency' => 'GBP',
'locale' => 'en', 'locale' => 'uk',
'created_at' => now(), 'created_at' => now(),
'updated_at' => now(), 'updated_at' => now(),
] ]

View File

@@ -38,7 +38,7 @@ class ScrapeWebsite extends Command
$progress = new ProgressBar($output); $progress = new ProgressBar($output);
$countries = Country::all(); $countries = Country::all();
foreach($countries as $country) { foreach($countries as $country) {
$output->writeln('Country name: ' . $country->countryName."\n"); $output->writeln('Country name: ' . $country->countryName);
$progress->start(); $progress->start();
$products = $this->getProducts($country); $products = $this->getProducts($country);
$progress->setMaxSteps(count($products)); $progress->setMaxSteps(count($products));

View File

@@ -22,7 +22,7 @@
</ol> </ol>
</nav> </nav>
</td> </td>
<td><a href='https://pl.ryobitools.eu/{{ product.url }}'>link</a></td> <td><a href='https://{{ product.country.locale }}.ryobitools.eu{{ product.url }}'>link</a></td>
</tr> </tr>
<tr> <tr>
<td colspan="5"> <td colspan="5">

View File

@@ -62,7 +62,7 @@
</ol> </ol>
</nav> </nav>
</td> </td>
<td class="align-middle"><a href='https://pl.ryobitools.eu/{{ product.url }}'>link</a></td> <td class="align-middle"><a href='https://{{ product.country.locale }}.ryobitools.eu{{ product.url }}'>link</a></td>
<td class="align-middle text-end"> <td class="align-middle text-end">
{% if product.isDiscontinued() or product.priceCurrent == product.productStandardPrice %} {% if product.isDiscontinued() or product.priceCurrent == product.productStandardPrice %}
{{ product.priceLowest | format_currency(product.country.currency, {}, product.country.locale) }} {{ product.priceLowest | format_currency(product.country.currency, {}, product.country.locale) }}