Google Now doesnt show order schema - markup

I tried Parcel Delivery and it worked, i can click on the little button on the right site in gmail and a cart shows up in google now.
However Order doesn't seem to work for me at all.
I used the google markup tester and it said its fine. I also do have the button on the right site in gmail, but no cart shows up in google now. Since i can't figure out what i'm doing wrong i know ask you this question.
This is the Code i use. It is the code you provide on your site, except that i changed the orderDate since that caused a problem while i tested Parcel Delivery.
<div itemscope itemtype="http://schema.org/Order">
<div itemprop="merchant" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Amazon.com"/>
</div>
<meta itemprop="orderNumber" content="123-4567890-1234567"/>
<meta itemprop="priceCurrency" content="USD"/>
<meta itemprop="price" content="539.00"/>
<div itemprop="acceptedOffer" itemscope itemtype="http://schema.org/Offer">
<div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="Samsung Chromebook"/>
<meta itemprop="sku" content="B009LL9VDG"/>
<link itemprop="url" href="https://rads.stackoverflow.com/amzn/click/com/B009LL9VDG" rel="nofollow noreferrer"/>
<link itemprop="image" href="http://ecx.images-amazon.com/images/I/81H-DO3qX0L._SX522_.jpg"/>
</div>
<meta itemprop="price" content="249.99"/>
<meta itemprop="priceCurrency" content="USD"/>
<div itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
<meta itemprop="value" content="2"/>
</div>
<div itemprop="seller" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Samsung Marketplace Store"/>
</div>
</div>
<div itemprop="acceptedOffer" itemscope itemtype="http://schema.org/Offer">
<div itemprop="itemOffered" itemscope itemtype="http://schema.org/Product">
<meta itemprop="name" content="Google Chromecast"/>
<meta itemprop="sku" content="B00DR0PDNE"/>
<link itemprop="url" href="https://rads.stackoverflow.com/amzn/click/com/B00DR0PDNE" rel="nofollow noreferrer"/>
<link itemprop="image" href="http://ecx.images-amazon.com/images/I/811nvG%2BLgML._SY550_.jpg"/>
</div>
<meta itemprop="price" content="29.99"/>
<meta itemprop="priceCurrency" content="USD"/>
<div itemprop="eligibleQuantity" itemscope itemtype="http://schema.org/QuantitativeValue">
<meta itemprop="value" content="1"/>
</div>
<div itemprop="seller" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Google Store # Amazon"/>
</div>
</div>
<div itemprop="priceSpecification" itemscope itemtype="http://schema.org/DeliveryChargeSpecification">
<meta itemprop="price" content="10.00"/>
<meta itemprop="priceCurrency" content="USD"/>
</div>
<link itemprop="url" href="https://www.amazon.ca/gp/css/summary/edit.html/orderID=123-4567890-1234567"/>
<link itemprop="orderStatus" href="http://schema.org/OrderStatus/OrderProcessing"/>
<link itemprop="paymentMethod" href="http://schema.org/CreditCard"/>
<meta itemprop="paymentMethodId" content="**** **** **** 1234"/>
<meta itemprop="orderDate" content="2014-12-02T23:30:00-08:00"/>
<meta itemprop="isGift" content="false"/>
<meta itemprop="discount" content="0.97"/>
<meta itemprop="discountCurrency" content="USD"/>
<div itemprop="customer" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Smith"/>
</div>
<div itemprop="billingAddress" itemscope itemtype="http://schema.org/PostalAddress">
<meta itemprop="name" content="Google"/>
<meta itemprop="streetAddress" content="1600 Amphitheatre Pkwy"/>
<meta itemprop="addressLocality" content="Mountain View"/>
<meta itemprop="addressRegion" content="CA"/>
<meta itemprop="addressCountry" content="USA"/>
</div>
<link itemprop="orderStatus" href="http://schema.org/OrderInTransit"/>
</div>

Google Now only displays parcel delivery cards, not order markups.
In Google now, if you go to settings->cards->Gmails-> Show cards based on Gmail ---- you see option for Package tracking only.
Hope that helps!

Related

Include inside section doesn't work Laravel Blade

I have a #section inside my child template and I am trying to include another template inside of it, but It doesn't work.
My parent template looks like this:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- X-csrf token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
{{-- Custom CSS --}}
#yield('head')
{{-- Open Sans font --}}
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300&display=swap" rel="stylesheet">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{$title}}</title>
</head>
<body>
#yield('content')
#yield('footer')
</body>
{{-- JS files --}}
#yield('javascript')
</html>
My child template code:
#extends('layouts.app')
{{-- /////////////////////////////////////////////////////////////////// --}}
#section('head')
{{-- Custom CSS for index page --}}
<link rel="stylesheet" type="text/css" href="{{asset('css/index.css')}}">
#endsection
{{-- /////////////////////////////////////////////////////////////////// --}}
#section('header')
<header>
#include('navbar')
</header>
#endsection
{{-- /////////////////////////////////////////////////////////////////// --}}
#section('content')
<section>
<div class="entry-texts">
<h1 class="entry-title">Welcome to my page!</h1>
<h2 class="entry-subtitle">Must be some text in here.</h2>
</div>
</section>
#endsection
{{-- /////////////////////////////////////////////////////////////////// --}}
#section('footer')
<footer>
</footer>
#endsection
{{-- /////////////////////////////////////////////////////////////////// --}}
#section('javascript')
#endsection
The problem is in this part:
#section('header')
<header>
#include('navbar')
</header>
#endsection
It does not include my navbar in the header tag. My navbar file is located in views directory. What is the problem and what am I doing wrong here?
Your parent template does not have #yield('header') and your navbar is in a section called #section('header')
You are yielding head but using section header. This is the problem.
Use #section('head')
just a little clarification. your head section should end with stop as in for yielding scripts and styles:
#section('head')
{{-- Custom CSS for index page --}}
<link rel="stylesheet" type="text/css" href="{{asset('css/index.css')}}">
#stop
You should try this:
<!DOCTYPE html>
<html lang="en">
<head>
<!-- X-csrf token -->
<meta name="csrf-token" content="{{ csrf_token() }}">
{{-- Custom CSS --}}
#section('head')
{{-- Open Sans font --}}
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300&display=swap" rel="stylesheet">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>{{$title}}</title>
</head>
<body>
#yield('content')
#yield('footer')
</body>
{{-- JS files --}}
#yield('javascript')
</html>

mozilla dev tools bug with bootstrap

I decided to try Bootstrap 4. I have rather a simple HTML file:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Template</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>
<body>
<header class="container-fluid">
<div class="row">
<div class="col">
</div>
</div>
<div class="row">
<div class="col">
</div>
</div>
<div class="row">
<div class="col-1">
</div>
<div class="col-10">
</div>
<div class="col-1">
</div>
</div>
</header>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>
But when I hover the latest col-1 element in the developer tools, the horizontal scrollbar appears. Look at the image below.
Firefox bug
Who have any ideas how to wrastle with it?
your code is okay
I tried it in Google chrome, and the horizontal scrollbar doesn't appear
also I download firefox and installed it, then tried what you made, and there is no horizontal scrollbar as well
You may have an error in your firefox, you may download the new version from here;
https://www.mozilla.org/en-US/firefox/new/

Laravel views MIME type issues

While loading a view all assets are wrongly transferred with a MIME type text/html
So on the console I see:
Resource interpreted as Script but transferred with MIME type text/html: "http://trivia.dev/guest". guest:11
Resource interpreted as Image but transferred with MIME type text/html: "http://trivia.dev/guest". guest:71
Uncaught SyntaxError: Unexpected token <
The syntax error is on the first line of the html file, which means that it is read as a script, instead of HTML. For some reason this only occurs when I am pulling a script in my HTML.
My master layout:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>#yield('title') | Royal Trivia</title>
<link rel="icon" href="{{URL::to('img/favicon.png')}}">
<link rel="stylesheet" href="{{URL::to('css/style.css')}}">
<script src="{{URL::to('js/bundle.min.js')}}"></script>
</head>
<body>
<div class="flash">{{Session::get('flash_message')}}</div>
#yield('content')
</body>
</html>
Generated HTML:
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>שחק וזכה | Royal Trivia</title>
<link rel="icon" href="http://trivia.dev/img/favicon.png">
<link rel="stylesheet" href="http://trivia.dev/css/style.css">
<script src="http://trivia.dev/js/bundle.min.js"></script>
</head>
<body>
<div class="flash"></div>
<header>
<div class="container">
<ul class="lang-icons">
<li><img src="" alt="hebrew"/></li>
<li><img src="" alt="english"/></li>
<li><img src="" alt="spanish"/></li>
</ul> <!--lang-icons-->
<a class="logo" href="/">
<img src="http://trivia.dev/img/mobile/logo.png" alt="RoyalTrivia"/>
</a><!--logo-->
<div class="users-count">
<small>כרגע באתר 1000 משתמשים</small>
</div>
</div><!--container-->
</header><div class="cta-strip">
<div class="container">
<img class=mobile src="http://trivia.dev/img/mobile/login_image.png" alt="people"/>
<div class="cta-text">
<h1>משחק הטריוויה שמטריף את כולם</h1>
<h4>הידע שלכם שווה כסף</h4>
<h5>ענו על 3 שאלות טריוויה</h5>
<h5>אם עניתם נכון ומהר יותר מהמתחרה מולכם - זכיתם</h5>
<h3>בואו להרוויח כסף</h3>
</div> <!--cta-text--> </div> <!--container-->
</div> <!--cta-strip--><div class="buttons-strip">
<div class="container">
<div class="cta-text">
<h1>משחק הטריוויה שמטריף את כולם</h1>
<h4>הידע שלכם שווה כסף</h4>
<h5>ענו על 3 שאלות טריוויה</h5>
<h5>אם עניתם נכון ומהר יותר מהמתחרה מולכם - זכיתם</h5>
<h3>בואו להרוויח כסף</h3>
</div> <!--cta-text--> <div class="CTA-btns">
<div class="login-btn clearfix">
<small>משתמש רשום?</small>
<a class="star-btn login-link" href="#/login"><span>כניסה</span></a>
</div><!--login-btn-->
<div class="signup-btn clearfix">
<small>לא רשום?</small>
<a class="star-btn signup-link" href="#/signup"><span>הרשמה</span></a>
</div><!--signup-btn-->
</div><!--CTA-btns-->
</div><!--container-->
</div><!--buttons-strip--><footer>
<div class="container">
<ul class="social-icons">
<li><a href='facebook.com'><img src='someimage.png' alt='email'/></a></li>
<li><a href='facebook.com'><img src='someimage.png' alt=''/></a></li>
<li><a href='facebook.com'><img src='someimage.png' alt='youtube'/></a></li>
<li><a href='facebook.com'><img src='someimage.png' alt='google+'/></a></li>
<li><a href='facebook.com'><img src='someimage.png' alt='twitter'/></a></li>
<li><a href='facebook.com'><img src='someimage.png' alt='facebook'/></a></li>
</ul>
<p>© All rights reserved to Royal Trivia</p>
</div><!--container-->
</footer>
</body>
</html>
I found the problem thanks to #Unnawut's advice: The file name was incorrect (should have been bundle.js).
The weird thing was that I didn't get a 404, but was redirected to the /guest route which caused the MIME-type error and the syntax error.
I've looked through my files and found a 404 handler that redirected back to the homepage.

schema.org - having video object nested inside product

I am trying to add the schema.org meta tags to my product pages - having offers and ratings etc.
The code below works fine and I'm able to test it google rich snippet tool.
<div itemscope itemtype="http://schema.org/Product">
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="5">
<meta itemprop="reviewCount" content="20">
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">Rs.100</span>
</div>
</div>
Now I have a video of this product on this page and based on the page layout - it is positioned above the price. So when I insert the videoobject as shown below - the google rich snippet tool throws an error saying
Error: Page contains property "video" which is not part of the schema
This is the shorter version of the full code which gives the error.
<div itemscope itemtype="http://schema.org/Product">
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="5">
<meta itemprop="reviewCount" content="20">
</div>
<div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">
<meta itemprop="name" content="Hello World"/>
<meta itemprop="duration" content="T1M33S" />
<meta itemprop="thumbnailUrl" content="v2.jpg" />
<meta itemprop="contentURL" content="www.viddler.com/player/xyz"/>
<meta itemprop="embedURL" content="http://viddler.com/flash/publisher.swf?key=xyz"/>
<meta itemprop="description" content="Hello world"/>
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">Rs.100</span>
</div>
</div>
Now if I remove the video object and put it outside the product tag - its valid. But the way my page is structured - the video will appear within the product tag.
I can close the product tag - start the video tag - close the video tag and then open another new product tag - but then it will show as 2 different products.
Any idea how I should go about this.
Thanks
http://www.schema.org/Product doesn’t define the property video.
You could omit itemprop="video".
Drawback: The video is not associated with the product.
You could use the property description instead.
Drawback: the expected type is "Text" (but see Expected types vs text in the schema.org documentation).
You could use itemref to split your markup into two parts without creating two products, leaving the video out of the product item.
Drawback: The video is not associated with the product.
Just in case anyone stumbles across this looking for an answer to the question like I was. I'm not sure if this has changed since the original question was answered, but here is an up-to-date Jan 2018 answer.
According to schema.org (see http://schema.org/Product) CreativeWorks (of which VideoObjects are a type of) can be referenced from within a product with the use of itemprop="subjectOf" instead of itemprop="video". See the example below. This should work with Google's Structured Data Testing Tool.
<div itemscope itemtype="http://schema.org/Product">
<img itemprop="image" src="dell-30in-lcd.jpg" alt="A Dell UltraSharp monitor" />
<span itemprop="name">Dell UltraSharp 30" LCD Monitor</span>
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">87</span> out of <span itemprop="bestRating">100</span> based on <span itemprop="ratingCount">24</span> user ratings
</div>
<span itemprop="offers" itemscope="" itemtype="http://schema.org/Offer" class="price-excluding-tax">
<meta itemprop="availability" href="http://schema.org/InStock">
<meta itemprop="itemCondition" content="http://schema.org/NewCondition">
<span itemprop="priceSpecification" itemscope="" itemtype="http://www.schema.org/PriceSpecification" id="price-excluding-tax-1003">
<span class="price-currency" itemprop="priceCurrency" content="GBP">£</span> <span class="price" itemprop="price" content="999">999.00</span>
</span>
</span>
<div itemprop="subjectOf" itemscope itemtype="http://schema.org/VideoObject">
<meta itemprop="duration" content="PT1M7S" />
<meta itemprop="name" content="Opera® ProSafe Hospital Profiling Bed" />
<meta itemprop="description" content="The Opera® ProSafe is the flagship bed from the Opera® range. Its extra low height and high nursing height makes the bed an all-in-one bed, eliminating the need to use low profiling and standard profiling beds separately. The Opera® ProSafe accommodates up to a 10” mattress, allowing the bed to be used with deep airflow mattresses and comply with the BS EN 60601-2-52:2010 medical beds standard."
/>
<meta itemprop="thumbnailUrl" content="https://alpinehc.co.uk/media/import/prosafe-video-thumbnail.png" />
<meta itemprop="contentURL" content="https://vimeo.com/232354348" />
<meta itemprop="embedURL" content="https://player.vimeo.com/video/232354348" />
<meta itemprop="uploadDate" content="2017-09-04T11:37:00+08:00" />
<meta itemprop="height" content="340" />
<meta itemprop="width" content="190" />
<iframe src="https://player.vimeo.com/video/232354348?api=1&player_id=player1&autoplay=1&loop=1" height="240" width="320"></iframe>
</div>
</div>
Adding one more option to what unor already said.
You may consider your video as kind of review (overview of the product). You can even say (depending on your actual web page) that AggregateRating (you have in code)+reviews for it+video are all parts of this broad Review. Then markup may look like this:
<div itemscope itemtype="http://schema.org/Product">
<div itemprop="review" itemscope itemtype="http://schema.org/Review">
<div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
<meta itemprop="ratingValue" content="5">
<meta itemprop="reviewCount" content="20">
</div>
<div itemprop="video" itemscope itemtype="http://schema.org/VideoObject">
<meta itemprop="name" content="Hello World"/>
<meta itemprop="duration" content="T1M33S" />
<meta itemprop="thumbnailUrl" content="v2.jpg" />
<meta itemprop="contentURL" content="www.viddler.com/player/xyz"/>
<meta itemprop="embedURL" content="http://viddler.com/flash/publisher.swf?key=xyz"/>
<meta itemprop="description" content="Hello world"/>
</div>
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<span itemprop="price">Rs.100</span>
</div>
</div>

Is it NOT possible to have links to pages out of the root directory using the bootstrap dropdown nav?

Ok So almost everything works fine for me. When I try to use this as a template in Dreamweaver and create web pages, the links work and the drop down menu works too. But the drop down only works if the pages I've created are in the same root directory. If I create other folders and save web pages in there, I can get to those pages from the drop down, but once I'm at the page that's inside of another folder and try to use the drop down to navigate from there, I can't. It won't drop down again. I have to click on another link that isn't inside of the folder, like the home link for example. I thought maybe it was a path issue but I've also tried to make the paths absolute instead of relative but that hasn't worked either. I have been Googling for days to see if anyone else has had this same issue come up for them but haven't had any luck.
I have a feeling it's going to be something so easy and simple that I'm not thinking of or overlooking but I'm just not having any luck.
Below is the code that I've been using as an example from the download. If anyone can point me in the right direction, that would be so wonderful!
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="../css/bootstrap.min.css">
<style>
body {
padding-top: 60px;
padding-bottom: 40px;
}
</style>
<link rel="stylesheet" href="../css/bootstrap-responsive.min.css">
<link rel="stylesheet" href="../css/main.css">
<script src="../js/vendor/modernizr-2.6.1-respond-1.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('.dropdown-toggle').dropdown();
});
</script>
<!-- This code is taken from http://twitter.github.com/bootstrap/examples/hero.html -->
<div class="navbar navbar-inverse navbar-static-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<a class="brand" href="#">Project name</a>
<div class="nav-collapse collapse">
<ul class="nav">
<li class="active">Home</li>
<li>About</li>
<li>Contact</li>
<li class="dropdown">
Dropdown <b class="caret"></b>
<ul class="dropdown-menu">
<li>In the Root</li>
<li>In Subfolder</li>
<li>Absolute</li>
<li class="divider"></li>
<li class="nav-header">Nav header</li>
<li>Separated link</li>
<li>One more separated link</li>
</ul>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
</div>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.2.min.js"> <\/script>')</script>
<script src="../js/vendor/bootstrap.min.js"></script>
<script src="../js/plugins.js"></script>
<script src="../js/main.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$('.dropdown-toggle').dropdown();
});
</script>
<script>
var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
s.parentNode.insertBefore(g,s)}(document,'script'));
</script>

Resources