X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Page Title in 4.2 (https://forum.x-cart.com/showthread.php?t=46663)

cflsystems 09-27-2009 06:45 PM

Re: Page Title in 4.2
 
You have to have comma after each element of the array except for the last one. Put comma after
Code:

"override_child_meta" => $override_child_meta

digiemp 09-27-2009 06:51 PM

Re: Page Title in 4.2
 
Thanks!

Now I have to go back and add commas to the rest of the .php files =(
But at least I know what's wrong and how to fix it. I was afraid I'd have to go back and undo all the changes I just made.

Again, thanks, both for your addressing my question and also for this modification.

hooter 09-27-2009 07:40 PM

Re: Page Title in 4.2
 
Oops, sorry, never mind, I was responding to second page of thread not seeing it had already been answered on 3rd page.

digiemp 10-13-2009 08:22 AM

Re: Page Title in 4.2
 
Apparently I have messed up the import_categories.php file as well. I get the following error when trying to reach the import page:

Parse error
: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /public_html/*edit*.com/include/import_categories.php on line 78

Here is my code, hopefully I included enough of it for assistance.

Code:

if (!defined('IMPORT_CATEGORIES')) {
#
# Make default definitions (only on first inclusion!)
#
    define('IMPORT_CATEGORIES', 1);
    $import_specification["CATEGORIES"] = array(
        "category_page_title" => array() #Added by CFL Systems for category page title
        "script"        =>  "/include/import_categories.php",
        "tpls"              => array(
            "main/import_option_default_category.tpl",
            "main/import_option_category_path_sep.tpl",
            "main/import_option_images_directory.tpl"),
        "export_tpls"    => array(
            "main/export_option_export_images.tpl",
            "main/export_option_category_path_sep.tpl"),
        "permissions"    => "A", # Only admin can import categories
        "need_provider" => 0,
        "finalize"        => true,
        "export_sql"    => "SELECT categoryid FROM $sql_tbl[categories] ORDER BY categoryid_path, order_by",
        "orderby"        => 25,


Line 77, 78, and 79:

Code:

"category_page_title" => array() #Added by CFL Systems for category page title
        "script"        =>  "/include/import_categories.php",
        "tpls"              => array(


Thanks,

cflsystems 10-13-2009 09:53 AM

Re: Page Title in 4.2
 
You need comma (,) after "category_page_title" => array()

When I wrote that mod "category_page_title" => array() was the last call in the array. It look like for 4.2.2 they have added more elements into the array. Remember - array elements are separated by comma (,), no comma after the last one

digiemp 10-13-2009 10:36 AM

Re: Page Title in 4.2
 
Thank you. I have added a comma (see code below), but now get the same error for line 84. I guess I'm having trouble finding where to add/remove commas. I've added/removed them from a few different places now and each time gives me an error on a different line.

Code:

define('IMPORT_CATEGORIES', 1);
    $import_specification["CATEGORIES"] = array(
        "category_page_title" => array(), #Added by CFL Systems for category page title
        "script"        =>  "/include/import_categories.php",
        "tpls"              => array(
            "main/import_option_default_category.tpl",
            "main/import_option_category_path_sep.tpl",
            "main/import_option_images_directory.tpl"),
        "export_tpls"    => array(
            "main/export_option_export_images.tpl",
            "main/export_option_category_path_sep.tpl"),
        "permissions"    => "A", # Only admin can import categories
        "need_provider" => 0,
        "finalize"        => true,
        "export_sql"    => "SELECT categoryid FROM $sql_tbl[categories] ORDER BY categoryid_path, order_by",
        "orderby"        => 25,
        "depending"        => array("C","CI","CT"),
        "columns"        => array(
            "categoryid"  => array(
                "is_key"    => true,
                "type"        => "N",
                "required"    => false,
                "default"    => 0),
            "category"        => array(
                "is_key"    => true,
                "required"  => true),
            "clean_url"        => array(
                "type"    => "U"
            ),
            "descr"            => array(
                "eol_safe"    => true),
            "meta_keywords"    => array(),
            "meta_description"    => array(),
            "override_child_meta" => array(
                "type"        => "B",
                "default"    => "N"),
            "avail"            => array(
                "type"        => "B",
                "default"    => "Y"),
            "orderby"        => array(
                "type"        => "N",
                "default"    => 0),
            "views_stats"    => array(
                "type"        => "N"),
            "product_count"    => array(
                "type"        => "N"),
            "membershipid"    => array(
                "array"        => true,
                "type"        => "N"),
            "membership"    => array(
                "array"    => true),
            "icon"            => array(
                "type"        => "I",
                "itype"        => "C")
        )
    );


Line 83, 84, 85:
Code:

"export_tpls"    => array(
            "main/export_option_export_images.tpl",
            "main/export_option_category_path_sep.tpl"),


cflsystems 10-13-2009 10:57 AM

Re: Page Title in 4.2
 
I did not see this in when I answered before. It seems like my original instructions are not easy to follow, sorry. You are adding the code in the wrong place. It is not supposed to go right after
Code:

$import_specification["CATEGORIES"] = array(
Take it out of there and put it after
Code:

  "icon"  => array(
    "type"  => "I",
    "itype"  => "C")


so the code will look like this
Code:

.......................
  "membershipid" => array(
    "array"  => true,
    "type"  => "N"),
  "membership" => array(
    "array"    => true),
  "icon"  => array(
    "type"  => "I",
    "itype"  => "C"),
  "category_page_title" => array() #Added by CFL Systems for category page title
  )
 );


digiemp 10-13-2009 11:14 AM

Re: Page Title in 4.2
 
Still getting:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /public_html/*edit*.com/include/import_products.php on line 84

Code:
Code:

define('IMPORT_CATEGORIES', 1);
    $import_specification["CATEGORIES"] = array(
        "script"        =>  "/include/import_categories.php",
        "tpls"              => array(
            "main/import_option_default_category.tpl",
            "main/import_option_category_path_sep.tpl",
            "main/import_option_images_directory.tpl"),
        "export_tpls"    => array(
            "main/export_option_export_images.tpl",
(Line 84)     "main/export_option_category_path_sep.tpl"),
        "permissions"    => "A", # Only admin can import categories
        "need_provider" => 0,
.... ...

"membership"    => array(
                "array"    => true),
            "icon"            => array(
                "type"        => "I",
                "itype"        => "C"),
                "category_page_title" => array() #Added by CFL Systems for category page title
        )
    );


cflsystems 10-13-2009 11:58 AM

Re: Page Title in 4.2
 
Attach the entire import_categories.php file here. You may need to rename it to .txt or something else

digiemp 10-13-2009 12:08 PM

Re: Page Title in 4.2
 
1 Attachment(s)
Here it is. Thank you for looking into this.


All times are GMT -8. The time now is 11:24 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.