Skip to content

Commit

Permalink
description added
Browse files Browse the repository at this point in the history
  • Loading branch information
pitva90 committed Nov 20, 2024
1 parent 895b7e8 commit 7d1f4ec
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 33 deletions.
30 changes: 2 additions & 28 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@
"https://www.youtube.com/channel/UC0wtqzWrBA5gL4Jr_QIQTgg",
"https://x.com/Alzacz"
],
"specialty": ["Prodej elektroniky", "Servis PC", "Black Friday Slevy"],
"paymentAccepted": ["Cash", "Credit Card", "Bank Transfer"],
"awards": ["Autorizovaný servis Epson", "Autorizovaný prodejce Microsoft", ""],
"priceRange": "$$",
"description": "Největší obchod s počítači a elektronikou ✅ Přes 40 prodejen, více než 1 000 Alzaboxů a 15 000 dalších odběrných míst ✅ Elektronika, hračky, domácí pořeby atd.",
"amenityFeature": [
{
"@type": "LocationFeatureSpecification",
Expand All @@ -73,33 +73,7 @@
"value": true
}
],
"offers": [
{
"@type": "Offer",
"itemOffered": {
"@type": "Service",
"name": "Servis PC"
},
"description": "Cena dle závady"
},
{
"@type": "Offer",
"itemOffered": {
"@type": "Product",
"name": "Firemní licence Windows 11"
},
"price": "2999",
"priceCurrency": "CZK"
},
{
"@type": "Offer",
"itemOffered": {
"@type": "Service",
"name": "Nasrání zeleným alzákem v reklamě"
},
"description": "K nezaplacení"
}
],

"location":[
{
"@type": "Place",
Expand Down
8 changes: 7 additions & 1 deletion schema/organization.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,13 @@
<h2 class="group-name">Vlastnosti</h2>
<div class="inputs-outer-wrap">
<div class="inputs-wrap">
<div class="input-item speciality full-width">
<?php /*<div class="input-item speciality full-width">
<label for="specialty">Specializace (více možností oddělte čárkou)</label>
<input id="specialty" name="specialty" type="text" placeholder="Diagnostika motoru, Hyundai, Zimní pergoly na míru, ...">
</div> */ ?>
<div class="input-item description full-width">
<label for="description-main">Popis obchodu, firmy, co nabízí, na co zaměřuje, v čem vyniká...</label>
<input id="description-main" name="description" type="text">
</div>
<div class="input-item payments full-width">
<label for="paymentAccepted">Možnost platby (více možností oddělte čárkou)</label>
Expand All @@ -136,6 +140,7 @@
</div>
</div>

<?php /*
<div id="organization-offers-1" class="group-wrap offer last-group" data-group-index="1">
<h2 class="group-name">Produkty / Služby #1</h2>
<div class="inputs-outer-wrap">
Expand Down Expand Up @@ -170,6 +175,7 @@
</div>
</div>
</div>
*/ ?>

<div id="organization-location-1" class="group-wrap location last-group" data-group-index="1">
<h2 class="group-name">Místo #1</h2>
Expand Down
12 changes: 8 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ function generateOrganizationSchema() {
result += '"sameAs": "' + organizationOtherUrlsArray[0] + '"';
}

if($('#organization-info #specialty').val().length > 0) {
/*if($('#organization-info #specialty').val().length > 0) {
let specialty = $('#organization-info #specialty').val().replace(/, /g, ',');
let specialtyArray = specialty.split(',');
Expand All @@ -458,7 +458,7 @@ function generateOrganizationSchema() {
} else {
result += ',\n"specialty": "' + specialtyArray[0] + '"';
}
}
}*/

if($('#organization-info #paymentAccepted').val().length > 0) {
let paymentAccepted = $('#organization-info #paymentAccepted').val().replace(/, /g, ',');
Expand Down Expand Up @@ -486,6 +486,10 @@ function generateOrganizationSchema() {
result += ',\n"priceRange": "' + $('#organization-info #priceRange').val() + '"';
}

if($('#organization-info #description-main').val().length > 0) {
result += ',\n"description": "' + $('#organization-info #description-main').val() + '"';
}

if($('#organization-info #amenityFeature').val().length > 0) {
let amenityFeature = $('#organization-info #amenityFeature').val().replace(/, /g, ',');
let amenityFeatureArray = amenityFeature.split(',');
Expand Down Expand Up @@ -513,7 +517,7 @@ function generateOrganizationSchema() {
}
}

$('.group-wrap.offer.listed').each(function(i, e) {
/*$('.group-wrap.offer.listed').each(function(i, e) {
organizationOffersArray.push({});
$(this).find('input, select').each(function(){
if($(this).val().length > 0) {
Expand Down Expand Up @@ -565,7 +569,7 @@ function generateOrganizationSchema() {
});
result += '\n]';
};
};*/

$('.group-wrap.location').each(function(i, e) {
const locationGroupId = $(this).attr('data-group-index')
Expand Down

0 comments on commit 7d1f4ec

Please # to comment.