Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Forum Search
Google Site Search
 All Forums
 Technical
 PHP (Unix / Linux / Apache) versions
 Add a title for deleted product
Next Page
Author « Topic »
Page: of 2

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/17/2022 :  07:39:47  
Hello!

How can I add a title on a page when a product is no longer available?

https://www.lineaire.com/Balle-rebondissante

Thanks!

Guy



Articles Promotionnels | Promotional Products

Edited by - Guy on 03/17/2022 07:40:05

Marshall
Ecommerce Template Guru

USA
1916 Posts

Posted - 03/17/2022 :  08:34:50  
You could leave the product, delete all the information such as price (set to zero), delete short and long descriptions, images, and any other such information, disable the sell button, or set the stock level to zero (if you are using stock management) then put in your short description "This product is no longer available." If there is a replacement product, you could add to the description something like "You might be interested in..." with a link to the product.

Marshall
CENLYT Productions - ms designs
Affordable Web Design
Custom Ecommerce Designs
Responsive Websites
Cenlyt.com

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/17/2022 :  08:39:31  
Hello Marshall,

Thanks for the suggestion, but it's not what I'm looking for.

Guy



Articles Promotionnels | Promotional Products

Marshall
Ecommerce Template Guru

USA
1916 Posts

Posted - 03/17/2022 :  10:02:33  
Are you just looking to fill the blank <title> </title> tags?

Marshall
CENLYT Productions - ms designs
Affordable Web Design
Custom Ecommerce Designs
Responsive Websites
Cenlyt.com

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/17/2022 :  10:09:40  
Yes!

I want to start by adding a title and I will probably develop the content later.

Thanks!

Guy



Articles Promotionnels | Promotional Products

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/21/2022 :  03:02:24  
Anyone have an idea?

Thanks!

Guy



Articles Promotionnels | Promotional Products

Vince
Administrator

42853 Posts

Posted - 03/21/2022 :  05:03:01  
Hi Guy
quote:
How can I add a title on a page when a product is no longer available?
I really don't know how to do this so that's why I didn't answer. But really, I'm not 100% sure it's what you want to do anyway. Looking at this...
quote:
I want to start by adding a title and I will probably develop the content later.
...it may be that you want to create a product but just remove the "Sell" button.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/21/2022 :  05:53:28  
Hello Vince,

If you look at this product that is no longer available, there is no title.

https://www.lineaire.com/Balle-rebondissante

I think it would be better to add a title. Even if it's "Error 404" (I think it's an Error 404 page in this case).

But if you don't know how to do this or if it's no possible, well, it will stay this way.

Thanks!

Guy



Articles Promotionnels | Promotional Products

Marshall
Ecommerce Template Guru

USA
1916 Posts

Posted - 03/21/2022 :  09:53:39  
Not sure if this will work. Just a thought.
<title><?php if(!empty($pagetitle)) {print $pagetitle;} else print "Page Not Found";?></title>

Marshall
CENLYT Productions - ms designs
Affordable Web Design
Custom Ecommerce Designs
Responsive Websites
Cenlyt.com

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/21/2022 :  12:03:51  
Hello Marshal,

It could be a solution, but I'll wait to see what Vince thinks. He often has flashes of genius!

Guy



Articles Promotionnels | Promotional Products

Vince
Administrator

42853 Posts

Posted - 03/21/2022 :  13:57:46  
Hi Guy
quote:
He often has flashes of genius!
Never on Mondays.

But isn't the idea of this to get the product indexed in Google even before you have it for sale? I really don't think you want to have pages with titles like "Error 404" when it's not a 404 page as Google will flag. If you do want this to rank the page, then I don't understand why not to actually create a proper page.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/21/2022 :  15:33:32  
Hello Vince,

I will reply tomorrow!

The link https://www.lineaire.com/Balle-rebondissante is a product that was deleted. It's not a new product. It's a product that was removed from the database.

So if you visit the page, it's an error 404 page, no?

Guy



Articles Promotionnels | Promotional Products

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/23/2022 :  15:50:49  
Well, it look like it's impossible to add a title to the Error 404 page.

I don't understand why it's not possible.

Guy



Articles Promotionnels | Promotional Products

Vince
Administrator

42853 Posts

Posted - 03/24/2022 :  02:43:09  
quote:
Well, it look like it's impossible to add a title to the Error 404 page.
Ok, when this started I figured you wanted a page title for an actual product. Then Marshall came up with a solution for when a product doesn't exist at all but that didn't seem to solve the problem so I figured it really was for a title based on an actual product. But I think that Marshall was right and I have made some changes to the proddetail.php page for the .com and.ca domains to so something like this. Can you have a look and see if that is the kind of thing you are looking for?

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/24/2022 :  05:26:12  
Hello Vince,

I must not express myself properly!

I see that the page title in the browser title bar is now OK.

Now, how can a I add a h1 title to the page en how can I centered the text?

Here how it is at the moment :



Here how I would like it to appear :



Many thanks for your help!


Guy



Articles Promotionnels | Promotional Products

Vince
Administrator

42853 Posts

Posted - 03/24/2022 :  07:14:21  
Hi Guy
In that case you could do this. In the file proddetail.php just before the incproddetail.php file add something like this...

if(trim($productname)=='')
print '<h1 class="prodnotfound">Product Not Found</h1>';

Then add some style for the class in your site CSS file...

h1.prodnotfound{
text-align:center;
}

Vince



Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/24/2022 :  07:20:38  
Hello Vince,

h1 need to be left align.

What I need to center align is the text message as we can't read it completely on narrow screen size.

Thanks!

Guy



Articles Promotionnels | Promotional Products

Vince
Administrator

42853 Posts

Posted - 03/24/2022 :  10:31:27  

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/24/2022 :  11:06:22  
Hello Vince,

I added

div.prodnoexist{
text-align:left !important;
}

to ect.css, but the text is not centered, it moved to the left.

I also try

div.prodnoexist{
text-align:center !important;
}

But result is the same as before. The text is not centered on the page.

Also, for H1, I already use this on proddetail.php :

<h1 itemprop="name"><?php print $productname; ?> <span style="color:#CC0000;"> <?php print $productid; ?></span></h1>

So I'm not sure what I need to do with

if(trim($productname)=='')
print '<h1 class="prodnotfound">Product Not Found</h1>';

Thanks for your patience!

Guy



Articles Promotionnels | Promotional Products

Edited by - Guy on 03/24/2022 11:07:12

quadrant
Ecommerce Template Guru

United Kingdom
1110 Posts

Pre-sales questions only
(More Details...)

Posted - 03/24/2022 :  12:03:45  
Hi Guy,

It looks like you are using Bootstrtap 4 which has a built in class to center text so no need to add a new class.

Simply add the class .text-center to center the H1

<h1 itemprop="name" class="text-center"> <span style="color:#CC0000;">Some Text Here</span></h1>

Regards,
David

Guy
ECT Moderator

Canada
2523 Posts

Posted - 03/24/2022 :  12:05:49  
Hello David,

I don't want to center the h1 tag, I want to center the text message.

Thanks!

Guy



Articles Promotionnels | Promotional Products
Page: of 2 « Topic »  
Next Page
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.05 seconds. Snitz Forums 2000