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
 PHP v7.3.7.002 Bug; sorry to be be a pain
Author « Topic »  

ITZAP
Ecommerce Template Guru

Australia
1018 Posts

Posted - 11/14/2021 :  20:18:13  
Running PHP Stable v7.3.7.002

About "Dynamic title and meta description tags" and Advanced products.php settings when viewing all pages :

$GLOBALS['allpagestitle'] is retrieved and printed just fine in both <title>source code</title> and as the <h1>page heading</h1>.

$GLOBALS['allpagesdescription'] is retrieved and printed fine in <meta name="Description"> source code.

However ...
in <div class="catheader"> what we actually get is the $GLOBALS['rootcategorydescription'] ... instead of $GLOBALS['allpagesdescription']

Sorry to be a pain, but would you mind having a look at this please Vince?

Regards,

Gary

Edited by - ITZAP on 11/14/2021 20:18:49

Vince
Administrator

42874 Posts

Posted - 11/15/2021 :  02:34:06  
Hi Gary
quote:
in <div class="catheader"> what we actually get is the $GLOBALS['rootcategorydescription'] ... instead of $GLOBALS['allpagesdescription']
The "rootcategorydescription" is just a global variable that is displayed in the example on that help page if there is no section description to display. But in the div.catheader it will always be the category header set in the database and I'm not really sure how it could be set to the value of "rootcategorydescription". Could you check to see if maybe your category header in the database is set to the same as your value for rootcategorydescription which could be confusing the issue.

Vince

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

ITZAP
Ecommerce Template Guru

Australia
1018 Posts

Posted - 11/15/2021 :  21:33:43  
Hi Vince, to better explain what I am on about ...

On products.php I use this dynamic code in the <body>:

<h1><?php
if(!empty($pagetitle) && $pno == 1) {print $pagetitle;}
else if(!empty($pagetitle) && $pno != 1){print $pagetitle . $pagenumber;}
else if(!empty($sectionname) && $pno == 1) {print $sectionname;}
else if(!empty($sectionname) && $pno != 1) {print $sectionname . $pagenumber;}
else if($pno == 1) {print $allpagestitle;}
else {print $allpagestitle . $pagenumber;} ?></h1>

<?php include_once "vsadmin/inc/incproducts.php") ?>


The <h1> heading works fine. But for <p>This is a the short description I would like to see when viewing All Pages.</p> ...

incproducts.php currently does this:

<?php if(!empty($sectiondescription)) {print str_replace('"','"',$sectiondescription);} else {print $rootcategorydescription;} ?>

when I would really prefer that it does this:

<?php if(!empty($sectiondescription) && $pno < 2) {print $sectiondescription;}
else if(!empty($sectiondescription) && $pno > 1) {print $sectiondescription . $pagenumber;}
else if($pno < 2) {print $allpagesdescription;}
else {print $allpagesdescription . $pagenumber;} ?>


The similar dynamic code I have in the <head> to generate <title> and <meta name="Description"> works just fine. I can send you that of you would like.

If any of these optional variables had not been defined in the includes.php file
$GLOBALS['rootcategorytitle']
$GLOBALS['rootcategorydescription']
$GLOBALS['allpagestitle']
$GLOBALS['allpagesdescription']

then they would print as empty?

I guess here I am assuming the advanced dynamic title and meta description code for categories.php and products.php should be stock standard for all Ecommerce Templates websites, which I suppose is wrong . Therefore, what I am wishing for cannot be implemented in your ECT Updater releases?

Gary

Edited by - ITZAP on 11/15/2021 21:54:08

Vince
Administrator

42874 Posts

Posted - 11/16/2021 :  01:06:06  
Hi Gary
The thing with the page titles and meta descriptions is that we figured they would be so individual to each website that it was hard to make a standard function to produce them. We provided the parameters and pretty much left it up to the store owner to form the tags in the way they chose, us providing code snippets as in that "Dynamic title and meta description tags" page.
quote:
If any of these optional variables had not been defined in the includes.php file
$GLOBALS['rootcategorytitle']
$GLOBALS['rootcategorydescription']
$GLOBALS['allpagestitle']
$GLOBALS['allpagesdescription']
then they would print as empty?
So yes, if they have not been defined they will be empty as they are just user defined parameters.

So if you want to modify anything then you are of course free to do so. If I can help with that then please let me know. I'm thinking now that making some kind of function in the metaino.php file could be handy and that would implement some of the logic as from the help page and I'll look into that later.

Vince

Click Here for Shopping Cart Software
Click Here to sign up for our newsletter
Click Here for the latest updater
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.02 seconds. Snitz Forums 2000