quadrant
Ecommerce Template Guru
United Kingdom
1110 Posts Pre-sales questions only (More Details...)
|
Posted - 03/24/2022 : 12:20:39
Hi Guy,
If you are referring to the: Ce produit n'est pas disponible actuellement ou a été retiré de notre base de données. then the margin is causing your issue on smaller devices.
You have: <div style="text-align:center;margin:50px" class="prodnoexist">Ce produit n'est pas disponible actuellement ou a été retiré de notre base de données.</div>
Try adding auto to the margin like this <div style="text-align:center;margin:50px auto" class="prodnoexist">Ce produit n'est pas disponible actuellement ou a été retiré de notre base de données.</div>
This will remove the left and right 50px margin
Regards, David
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 03/27/2022 : 09:37:36
Hello David, For what I can see, the CSS is part of incproddetail.php. I added div.prodnoexist{width:100%; text-align:center; margin:50px 0 100px 0;} to ect.css but it have no effect. I need to modify incproddetail.php to have it work. Maybe it's something Vince should change in the core file. However, I still can't figure how to add a H1 title to this page. Guy Articles Promotionnels | Promotional Products
Edited by - Guy on 03/27/2022 10:55:12
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 03/27/2022 : 19:32:06
Hi! I change the code for the H1 tag to <h1 itemprop="name"><?php print $productname; if(trim($productname)=='') print 'Ce produit est introuvable'; ?> <span style="color:#CC0000;"> <?php print $productid; ?></span></h1> Now the H1 title is OK. But I know very little about PHP, so I hope this code is fine. Guy Articles Promotionnels | Promotional Products
|
Vince
Administrator
42853 Posts |
Posted - 03/28/2022 : 03:43:30
Hi Guy <h1 itemprop="name"><?php print $productname; if(trim($productname)=='') print 'Ce produit est introuvable'; ?> <span style="color:#CC0000;"> <?php print $productid; ?></span></h1> You have set an itemprop of "name" but I don't think that's really a product name so may upset Google... <h1><?php print $productname; if(trim($productname)=='') print 'Ce produit est introuvable'; ?> <span style="color:#CC0000;"> <?php print $productid; ?></span></h1> The product id doesn't exist so this is the <span> isn't really doing anything... <h1><?php print $productname; if(trim($productname)=='') print 'Ce produit est introuvable'; ?></h1> If you add a class for the <h1> then you can set styles in the style sheet... <h1 class="prodnotfound"><?php print $productname; if(trim($productname)=='') print 'Ce produit est introuvable'; ?></h1> Then set whatever style you need in the style sheet like this... h1.prodnotfound{ color:#CC0000; } Vince Click Here for Shopping Cart SoftwareClick Here to sign up for our newsletterClick Here for the latest updater
![Go to Top of Page](images/icon_go_up.svg)
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 03/28/2022 : 04:40:24
Hello Vince, I understand what you mean, but when looking at the code, I'm not sure it will work. When a product is available, I want the H1 tag to look like this (Product name in black and product ID in red): ![](https://www.lineaire.com/ectforum/h1_tag.png) Product ID is part of the h1 tag as I think it help with Google. And when it don't : ![](https://www.lineaire.com/ectforum/h1_tag2.png) Also, when a product don't exist, the page should be reported as an Error 404 page to Google I believe. I don't think it is at the moment. Maybe the cart should handle Error 404 pages in a different way? I notice that there also some problems when a category don't exist. Thanks! Guy Articles Promotionnels | Promotional Products
Edited by - Guy on 03/28/2022 04:45:46
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 04/02/2022 : 07:49:32
Hi! I think that when a product or category don't exist, system should show an error 404 page. Is there a way to do this? Sorry if I'm a pain in the "you know what" ![Wink](images/icon_smile_wink.svg) , but I think it's very important. Thanks! Guy Articles Promotionnels | Promotional Products
|
Marshall
Ecommerce Template Guru
USA
1916 Posts |
Posted - 04/02/2022 : 08:00:42
quote: I think that when a product or category don't exist, system should show an error 404 page.
The reason is does not is to promote similar products in the same category. After all, the idea is to sell products not turn customers away. But for what you want, I believe my initial suggestion is the best route to take. MarshallCENLYT Productions - ms designs Affordable Web Design Custom Ecommerce Designs Responsive Websites Cenlyt.com
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 04/02/2022 : 08:50:10
Hello Marshall, I understand your point, but I think that the actual page is a bit useless. Personally, when I find a product that interests me on the Internet and if I visit the web page to realize that this product does not exist, I find it more frustrating than anything else. I have a supplier that keeps all discontinued products and I think that's a bad idea, it wastes my time. In my opinion, a good Error 404 page is much more appropriate with indication on what the user can do, like starting a new search by example. And an Error 404 page will indicate that the page don't longer exist to Google and all and that it need to be removed from the index. We don't want to keep old products when they are no longer available. We remove and add new products everyday. If we kept all our products, we would have 4 times more, which would be way too much. We have over 10,000 products and showing a lot of products that are no longer available would be a very bad idea I believe. So it's why I'm asking if there a way to replace the "product not found" or "category not found" page by an Error 404 one. Hope it make sens! Guy Articles Promotionnels | Promotional Products
![Go to Top of Page](images/icon_go_up.svg)
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 04/02/2022 : 10:09:37
Firstly the last thing a site owner wants is for a visitor to be either redirected to an alternative site they don't have any interest in, & I have dealt with a good few of those, or them to exit the door completely. quote: We don't want to keep old products when they are no longer available. We remove and add new products everyday.
Good practice on old products which are no longer available / end of life products is to re-direct visitors to a replacement / new / updated product page that is already live on the site, or will be soon. That is achieved via the .htaccess file using a 301 permanent redirect. By doing so keeps the visitor on your site, Google not just encountering a 404 & hopefully the customers start seeing or searching for other products of interest resulting in a spend. On a site I worked on last year for a local retailer their 404 error page was created in a way that a visitor is shown a 404 page along with the full search facility & posiible reasons as to why they have ended up on that page. That is how the retailer wanted it but I was saying it would be good IMHO to have more flexibility in having links to the products.php & categories.php available in the form of a two column setup with prods & cats on the 404 page, but so far they are happy with how it is. From the following example I purposely misspelled categories which, when entered into the browser, shows the misspelled URL in the browser address bar but actually displays the 404 page. https://cig-ease.DOTcoDOTuk/categries.php----------------------------------- Steve Manchester UK Make it as simple as possible, but not simpler.
Edited by - 1818charlie on 04/02/2022 10:15:05
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 04/02/2022 : 10:21:55
Hello Steve, A 301 redirect to an alternate product is a good idea, but it's not always possible. I like the idea to add the search page form on the https://cig-ease.DOTcoDOTuk/categries.php How can I do this? Thanks! Guy Articles Promotionnels | Promotional Products
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 04/02/2022 : 10:59:15
quote: A 301 redirect to an alternate product is a good idea, but it's not always possible
True, but in that case a redirect to the search page is probably a good start. quote: I like the idea to add the search page form on the https://cig-ease.DOTcoDOTuk/categries.php
I will have to dig around for the exact instructions which I won't have access to til Tuesday, if that's Ok for you Guy? ----------------------------------- Steve Manchester UK Make it as simple as possible, but not simpler.
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 04/02/2022 : 11:05:31
|
1818charlie
ECT Moderator
United Kingdom
1198 Posts |
Posted - 04/02/2022 : 11:15:14
Cheers Guy ![Approve](images/icon_smile_approve.svg) ----------------------------------- Steve Manchester UK Make it as simple as possible, but not simpler.
|
ITZAP
Ecommerce Template Guru
Australia
1018 Posts |
Posted - 04/02/2022 : 20:51:37
Guy and Steve, maybe this helps: Insert Search Form on any xxxxxxx.php page <div> <?php $GLOBALS['xxSrchPr']='<h2>Find it fast #8230;</h2>'; include_once 'vsadmin/inc/incsearch.php' ?> </div> In French that would be: <div> <?php $GLOBALS['xxSrchPr']='<h2>Trouvez-le rapidement #8230;</h2>'; include_once 'vsadmin/inc/incsearch.php' ?> </div> How to 301 redirectwww.example.com/proddetail.php?prod=SH-CRANK-KIT to www.example.com/proddetail.php?prod=SH-CRANK-NEW-KIT Here are the " .htaccess" file entries that achieve the proddetail.php page redirect, as described in that example. # ====================================================== # URL Redirects for proddetail.php pages # ====================================================== RewriteCond %{QUERY_STRING} ^prod=SH-CRANK-KIT RewriteRule ^proddetail\.php$ http://www.example.com/proddetail.php?prod=SH-CRANK-NEW-KIT [R=301,L]
Another 301 redirect example # ====================================================== # .htaccess URL Redirect for obsolete /has-static-url.php to new proddetail.php page # ====================================================== redirect 301 /the-old-product-page.php proddetail.php?prod=the-new-product-page Gary ![](https://itzap.com.au/pics/logo/itzap-website-design-works-mini-logo.png)
Edited by - ITZAP on 04/02/2022 20:56:28
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 04/06/2022 : 05:50:11
|
ITZAP
Ecommerce Template Guru
Australia
1018 Posts |
Posted - 04/06/2022 : 19:22:28
Hello Guy, I have tried all the SEO friendly URL redirect examples here: https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=107351With the Search Engine Friendly URL’s enabled, this old Rewrite method involving references to the Product ID does not work: RewriteCond %{QUERY_STRING} ^prod=SH-CRANK-KIT RewriteRule ^proddetail\.php$ https://example.com/proddetail.php?prod=SH-CRANK-NEW-KIT [R=301,L] However, this Redirect method involving an obsolete Static PHP Page will work: Redirect 301 /the-old-product-page.php https://example.com/The-New-Product-Page The other issue with SEO Friendly URL’s is the necessary parameter: $detlinkspacechar='-'; Which is usually a – dash, otherwise an _ underscore. If you use that $detlinkspacechar in the Product Name, that will cause an Error when you attempt to display the page. To solve this, you then need to enter a “Has Static URL” which does not contain the $detlinkspacechar. This URL you wish to redirect: Porte-cl\%25E9s_flexible_rectangle contains both a – dash and an _ underscore character, which complicates the issue. Sorry, but I was unable to find a working Redirect solution for SEO friendly URL’s. (Maybe somebody else can?) As to Bing showing a lot of wrong links, after updating your sitemap.xml, I guess all you can do is wait for the bots to reindex your website. Gary ![](https://itzap.com.au/pics/logo/itzap-website-design-works-mini-logo.png)
![Go to Top of Page](images/icon_go_up.svg)
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 04/06/2022 : 19:45:09
Hello Gary, Thank you very much for looking into this, I appreciate it. It look I will have to wait for Bing to update the index. I started using static URLs for a few weeks now, and I update the sitemap file frequently as I add new products almost everyday. I've done a lot of research about indexing issues with Bing and apparently I'm not the only one having this kind of problem. With Google, everything seems to be working fine. Google is better at handling accented characters. On the other hand, I find that Google is no longer a search engine, it is rather an "advertising engine"! I will have to update the "Product Not Found" page to make it better for our visitors, but this is an other subject. Regards, Guy Articles Promotionnels | Promotional Products
|
Guy
ECT Moderator
Canada
2523 Posts |
Posted - 04/08/2022 : 13:09:10
|
|