How to put my text after the content products? - text-align

So i have a ecommerce, and i'm writing a text to optimize the SEO, but I need the text must be align AFTER the products content and not before. It is a Simples CSS script?
This is the page: https://letsfitsp.com.br/comprar-marmitas-congeladas-sp
and this is the HTML text:
<p> </p>
<p><meta charset="utf-8" /></p>
<h1 dir="ltr"><b id="docs-internal-guid-f48b1604-7fff-3fb9-2913-5d5967828808">As Marmitas Congeladas SP Let’s Fit: Alto Padrão de Qualidade</b></h1>
<p dir="ltr"><b id="docs-internal-guid-f48b1604-7fff-3fb9-2913-5d5967828808">Sabemos, o que você busca é ter opções e variações de marmitas congeladas SP, não é? Aqui na Let’s Fit te entregamos sabor, com qualidade elevada e muitas escolhas diversificadas de comida congelada em São Paulo.</b></p>
<p> </p>
<h2 dir="ltr"><b id="docs-internal-guid-f48b1604-7fff-3fb9-2913-5d5967828808">Alimentos Fitness e melhores marmitas congeladas SP e Grande São Paulo | Só na Let’s Fit</b></h2>
<p dir="ltr"><b id="docs-internal-guid-f48b1604-7fff-3fb9-2913-5d5967828808">Todos nós temos ciência da importância da boa nutrição e como ela se faz importante para nosso condicionamento físico e saúde como um todo. Uma rotina com equilíbrio nos fortalece para enfrentar nossa cansativa e pesada rotina.</b></p>

CSS is a factor of SEO rank, but more in terms of legibility. For example a small font or hidden content would not positively impact SEO score. HTML which uses semantic elements such as <main> is more consumable to a spider crawl (regardless of order). Developers use tools such as Lighthouse to find reports. Often you may find it best to craft a canonical document to provide for page rank, which could be done with a plugin such as Yoast.

Related

Get Wikipedia page paragraph from API

How to get paragraph page from Wikipedia API ?
For instance, I'd like to get the following paragraph:
https://fr.wikipedia.org/wiki/Douarnenez#Urbanisme
I'm only able to get the entire page with:
https://fr.wikipedia.org/w/api.php?action=query&format=json&prop=revisions&titles=Douarnenez&formatversion=2&rvprop=content&rvslots=*
Credits: answer to: How to get a text of a specific section via wikipedia api - by Florian
I followed these steps in order to get the information you need.
First, get the index of the section you want to get - for that, use this endpoint for get the sections of the wiki page:
https://fr.wikipedia.org/w/api.php?action=parse&format=json&page=Douarnenez&prop=sections
Here is the API sandbox link you can try out.
In your specific case, I believe it's index=10:
{
"toclevel": 2,
"level": 3,
"line": "Typologie",
"number": "3.1",
"index": "10",
"fromtitle": "Douarnenez",
"byteoffset": 18641,
"anchor": "Typologie"
}
Then, use this next endpoint for get the text in the given section:
https://fr.wikipedia.org/w/api.php?action=parse&format=json&page=Douarnenez&prop=wikitext&section=10&disabletoc=1&utf8=1
The result is as follows - here is the link of the API sandbox:
{
"parse": {
"title": "Douarnenez",
"pageid": 4596068,
"wikitext": {
"*": "=== Typologie ===\nDouarnenez est une commune urbaine, car elle fait partie des communes denses ou de densité intermédiaire, au sens de la grille communale de densité de l'[[Institut national de la statistique et des études économiques|Insee]]<ref group=Note>Selon le zonage des communes rurales et urbaines publié en novembre 2020, en application de la nouvelle définition de la ruralité validée le {{date-|14 novembre 2020}} en comité interministériel des ruralités.</ref>{{,}}<ref >{{Lien web |url=https://www.observatoire-des-territoires.gouv.fr/typologie-urbain-rural |titre=Typologie urbain / rural |site=observatoire-des-territoires.gouv.fr |consulté le= 26 mars 2021}}.</ref>{{,}}<ref >{{Lien web |url=https://www.insee.fr/fr/metadonnees/definition/c1472|titre=Commune urbaine - définition |site=Insee.fr|consulté le= 26 mars 2021}}.</ref>{{,}}<ref >{{Lien web |url= https://www.observatoire-des-territoires.gouv.fr/methodes/comprendre-la-grille-de-densite|titre= Comprendre la grille de densité|site=observatoire-des-territoires.gouv.fr |consulté le= 26 mars 2021}}.</ref>. \nElle appartient à l'[[unité urbaine]] de Douarnenez, une unité urbaine monocommunale<ref>{{Lien web|url=https://www.insee.fr/fr/metadonnees/cog/unite-urbaine/UU202029306-douarnenez |titre=Unité urbaine 2020 de Douarnenez|site=insee.fr|consulté le= 26 mars 2021}}.</ref> de {{Unité|13902|habitants}} en 2017, constituant une ville isolée<ref name=\"UU2020\">{{Lien web|url=https://www.insee.fr/fr/information/4802589 |titre=Base des unités urbaines 2020 |date=21 octobre 2020|site=insee.fr |consulté le= 26 mars 2021}}.</ref>{{,}}<ref name=\"UU20202b\">{{Lien web|url=https://www.insee.fr/fr/statistiques/4806684 |titre=Toujours plus d’habitants dans les unités urbaines |auteur=Vianney Costemalle |date=21 octobre 2020 |site=insee.fr |consulté le= 26 mars 2021}}.</ref>."
}
}
}
You can use Regex to filter out your paragraph. That's not beautiful, but works.
For example:
((?<=== Urbanisme ==).*?(?=\\n== ))
This selects everything starting behind the headline of the Urbanism paragraph and ending before the next paragraph headline. See: https://regex101.com/r/LlGSay/1

Prestashop bring cart content to the front page

I want to remove cart button and display the added items to the cart in the top of the page. So it's always visible
So far I have no luck of finding the function I need to override. tried searching in ps_shoppingcart.php
maybe someone knows exactly what should I do to accomplish this mission.
Pour retirer le bouton du panier il faut "décrocher" le hook du bouton du panier dans "Apparence > Positions"
Pour la liste des articles, le plus simple serait de créer un petit module qui prendrait en charge un hook pour "s'accrocher" a la place du bouton du panier, et qui listerait les elements du panier (avec un foreach par exemple)

Odoo 10 - Move 1 unit to scrap location

Greetings to everyone.
I'm expanding the hr.employee class to add employee equipment. As this equipment will sooner or later need to be replaced, I want to make a button so that if a checkbox is marked, it will transfer a unit from the stock location to scrap location.
The reason is to have an updated inventory and a history of the use of these elements. I have recently started programming using the framework provided by Odoo and the truth is that I am somewhat lost.
class HrEmployeeLprl(models.Model):
_inherit = 'hr.employee'
# Botón actualizar
#api.one
#api.depends('hr', 'stock')
def action_lprl_update_inventory(self):
if self.renew_glasses:
move = self.env['stock.move'].create({
'name': '',
'location_id': self.glasses.property_stock_production.id,
'location_dest_id': self.scrap_location.id,
'product_id': self.glasses.id,
'product_uom': self.glasses.uom_id.id,
'product_uom_qty': 1
})
move._action_confirm()
move._action_assign()
move.move_line_ids.write({qty_done: 1})
move._action_done()
glasses = fields.Many2one(
comodel_name='product.product',
domain="[('categ_id', '=', 'LPRL / Gafas'), ('qty_available', '>', 0)]",
string=u'Equipo de protección visual',
help=u'Si no se muestra ningún producto compruebe que existan productos de la categoría en cuestión y que el stock sea mayor de 0'
)
renew_glasses = fields.Boolean(string="¿Renovar equipo de protección visual?")
scrap_location = fields.Many2one(
comodel_name='stock.location',
string=u'Destino del desecho',
help=u'¿En donde se almacena el desecho?'
)
It throws the following message in the log:
> /srv/http/odoo/odoo10/custom-addons/hr_lprl/models/hr_employee_lprl.py(34)action_lprl_update_inventory()
-> move._action_confirm()
And the view remains freezed.
I would appreciate advice and references where to go deeper, thanks.
Juanma Beltran Osa
As error Suggest on Odoo-10 stock.move does not have the method called
_action_confirm it is the action_confirm.
Try to check on Odoo-10 with the object that has those methods which you were trying to access and perform the operation.
Thanks

translate pipe inside v-html directive i18 vue with vuex

I'm using vuex-i18n package. Basically I'm translating most of my content by filter pipe like so:
{{ header | translate }}
but sometimes I need to translate text which in fact is just html and I bind it like so:
<p v-html="paragraph"></p>
but this doesn't work with pipe:
<p v-html="paragraph | translate"></p> // display ()
paragraph in above example is:
<p class="balears__text">Jest największym miastem Majorki, kosmopolityczną stolicą Balearów i prężniedziałającym, śródziemnomorskim ośrodkiem turystycznym.</p><p class="balears__text"> Katedra La Seu to zdecydowanie najsłynniejsza budowla Palmy. Ta gotycka świątynia z elementami architektury zaprojektowanej przez słynnego Gaudiego stanowi wizytówkę miasta i jest symbolem całej wyspy. </p><p class="balears__text"> Nieopodal katedry znajduje się pałac królewski La Almudaina. Spacer po komnatach i dziedzińcu sprawi, że poczujesz się, jakbyś wędrował po tych zabudowaniach w czasach ich świetności. </p><p class="balears__text"> Doskonałym pomysłem na rodzinne popołudnie jest wizyta w jednym z największych kompleksów akwariowych na świecie. W Palma Aquarium możesz przeżyć niesamowitą przygodę, nurkując z rekinami w najgłębszym zbiorniku w Europie, tzw. Big Blue. </p>
I found solution like so:
<p v-html="$options.filters.translate(paragraph)"></p>

SQL • Result of join in an array

Good evening,
Here is my problem: I make a select query on my table PROJECT to select (for now) my only test project. I do a join on the table to retrieve screenshots SCREENSHOT associated with it. Only he will get out as many results as there are screenshots! Ie here 5.
Could I go back to more data (name, datesortie, description, etc.) an associative array urls screenshots?
Or would you have a solution to simplify my life? Because the only solution I see is treating it directly in php.
Here is my query:
SELECT P.nom, datesortie, description, lien, icone, tag, S.url
FROM PROJET P
LEFT JOIN CLIENT C
ON C.idclient = P.idclient
LEFT JOIN SCREENSHOT S
ON S.idprojet = P.idprojet
ORDER BY P.nom
Here is what is returned (Sorry, my var_dump shows me that online ... I do not understand why):
array(7) { ["nom"]=> string(10) "BlackStars" ["datesortie"]=> string(10) "2012-07-02" ["description"]=> string(498) "Inspiré par Little Stars for Little Wars, Black Stars se veut être meilleur par bien des aspects. Prenez le contrôle d'une planète et partez à la conquête de l'univers en remportant chacune des batailles, en brisant chacune des planètes ennemies, en devenant le meilleur joueur. Car une fois le mode solo terminé, un mode multi-joueurs (Bluetooth ou Game Center) vous attend afin de vous mesurer au monde entier. Hissez-vous en haut du classement et devenez le maître incontesté de Black Stars. " ["lien"]=> string(69) "http://itunes.apple.com/us/app/black-stars/id512945753?l=fr&ls=1&mt=8" ["icone"]=> string(131) "http://a1775.phobos.apple.com/us/r30/Purple/v4/73/47/b7/7347b764-cff9-c52b-78da-42560a187acf/mza_1097997557772736292.170x170-75.png" ["tag"]=> string(10) "blackstars" ["url"]=> string(119) "http://a1352.phobos.apple.com/us/r30/Purple/v4/51/df/f5/51dff56b-08c6-59db-81df-80a174ec0050/mza_509496145749890361.png" }
===================================================
===================================================
array(7) { ["nom"]=> string(10) "BlackStars" ["datesortie"]=> string(10) "2012-07-02" ["description"]=> string(498) "Inspiré par Little Stars for Little Wars, Black Stars se veut être meilleur par bien des aspects. Prenez le contrôle d'une planète et partez à la conquête de l'univers en remportant chacune des batailles, en brisant chacune des planètes ennemies, en devenant le meilleur joueur. Car une fois le mode solo terminé, un mode multi-joueurs (Bluetooth ou Game Center) vous attend afin de vous mesurer au monde entier. Hissez-vous en haut du classement et devenez le maître incontesté de Black Stars. " ["lien"]=> string(69) "http://itunes.apple.com/us/app/black-stars/id512945753?l=fr&ls=1&mt=8" ["icone"]=> string(131) "http://a1775.phobos.apple.com/us/r30/Purple/v4/73/47/b7/7347b764-cff9-c52b-78da-42560a187acf/mza_1097997557772736292.170x170-75.png" ["tag"]=> string(10) "blackstars" ["url"]=> string(119) "http://a572.phobos.apple.com/us/r30/Purple/v4/db/1d/1d/db1d1d00-3a28-8b6f-d52f-342bf5893912/mza_3642427234916705950.png" }
===================================================
===================================================
array(7) { ["nom"]=> string(10) "BlackStars" ["datesortie"]=> string(10) "2012-07-02" ["description"]=> string(498) "Inspiré par Little Stars for Little Wars, Black Stars se veut être meilleur par bien des aspects. Prenez le contrôle d'une planète et partez à la conquête de l'univers en remportant chacune des batailles, en brisant chacune des planètes ennemies, en devenant le meilleur joueur. Car une fois le mode solo terminé, un mode multi-joueurs (Bluetooth ou Game Center) vous attend afin de vous mesurer au monde entier. Hissez-vous en haut du classement et devenez le maître incontesté de Black Stars. " ["lien"]=> string(69) "http://itunes.apple.com/us/app/black-stars/id512945753?l=fr&ls=1&mt=8" ["icone"]=> string(131) "http://a1775.phobos.apple.com/us/r30/Purple/v4/73/47/b7/7347b764-cff9-c52b-78da-42560a187acf/mza_1097997557772736292.170x170-75.png" ["tag"]=> string(10) "blackstars" ["url"]=> string(120) "http://a1701.phobos.apple.com/us/r30/Purple/v4/60/5f/ae/605fae3e-f00b-c3b7-0f65-ca73f6fd9864/mza_4565911160744621776.png" }
===================================================
===================================================
array(7) { ["nom"]=> string(10) "BlackStars" ["datesortie"]=> string(10) "2012-07-02" ["description"]=> string(498) "Inspiré par Little Stars for Little Wars, Black Stars se veut être meilleur par bien des aspects. Prenez le contrôle d'une planète et partez à la conquête de l'univers en remportant chacune des batailles, en brisant chacune des planètes ennemies, en devenant le meilleur joueur. Car une fois le mode solo terminé, un mode multi-joueurs (Bluetooth ou Game Center) vous attend afin de vous mesurer au monde entier. Hissez-vous en haut du classement et devenez le maître incontesté de Black Stars. " ["lien"]=> string(69) "http://itunes.apple.com/us/app/black-stars/id512945753?l=fr&ls=1&mt=8" ["icone"]=> string(131) "http://a1775.phobos.apple.com/us/r30/Purple/v4/73/47/b7/7347b764-cff9-c52b-78da-42560a187acf/mza_1097997557772736292.170x170-75.png" ["tag"]=> string(10) "blackstars" ["url"]=> string(119) "http://a193.phobos.apple.com/us/r30/Purple/v4/7c/ff/67/7cff67dc-d679-16ee-24cf-7f658c78b9c8/mza_8709328453215958742.png" }
===================================================
===================================================
array(7) { ["nom"]=> string(10) "BlackStars" ["datesortie"]=> string(10) "2012-07-02" ["description"]=> string(498) "Inspiré par Little Stars for Little Wars, Black Stars se veut être meilleur par bien des aspects. Prenez le contrôle d'une planète et partez à la conquête de l'univers en remportant chacune des batailles, en brisant chacune des planètes ennemies, en devenant le meilleur joueur. Car une fois le mode solo terminé, un mode multi-joueurs (Bluetooth ou Game Center) vous attend afin de vous mesurer au monde entier. Hissez-vous en haut du classement et devenez le maître incontesté de Black Stars. " ["lien"]=> string(69) "http://itunes.apple.com/us/app/black-stars/id512945753?l=fr&ls=1&mt=8" ["icone"]=> string(131) "http://a1775.phobos.apple.com/us/r30/Purple/v4/73/47/b7/7347b764-cff9-c52b-78da-42560a187acf/mza_1097997557772736292.170x170-75.png" ["tag"]=> string(10) "blackstars" ["url"]=> string(120) "http://a1443.phobos.apple.com/us/r30/Purple/v4/d7/13/8f/d7138f62-6398-7993-8d0b-23e0ce16dca2/mza_8316005873463209973.png" }
===================================================
===================================================
Thank you in advance for your help.
Cordially.
From what I gather, you just don't want all that repeating information in the first 6 fields?
Normally, accepting the repeating information is the way to go about it. But, you could pull back two record sets. Provided that they're neatly ordered you can do a nested loop to process them.
SELECT P.nom, datesortie, description, lien, icone, tag, idproject
FROM PROJET P
LEFT JOIN CLIENT C
ON C.idclient = P.idclient
LEFT JOIN SCREENSHOT S
ON S.idprojet = P.idprojet
ORDER BY P.nom
SELECT P.idproject S.url
FROM PROJET P
INNER JOIN SCREENSHOT S
ON S.idprojet = P.idprojet
ORDER BY P.nom
Note: The first query now also has the idproject field, which is also present in the second record set. The second record set is also ordered by P.nom, even though it's not selected in the statement; this just ensures that you can do a simple nested loop.
A simplifies pseudo-code could be...
FOR EACH nom IN recordSet1
WHILE recordSet1.idProject = recordSet2.idProject
Do something with the URL
Move to next record in recordSet2
LOOP
LOOP
What I would not do
Another option is to concatenate all of the URLs together into a single string. Perhaps separated by commas to make a CSV field.
But then the existence of a comma in the url will break that. So you probably then want to use XML or something; with added costs to generate and parse.
Unless the network overhead of the repeated fields is actually causing a problem, I would stick to that. And if it is causing a problem, the two-record-set alternative is more robust and relatively simple.