How to Modify Price Category of Zen-Cart?

How to modify price categories to:  29 Dollar Glasses, 39 Dollar Glasses, 49 Dollar Glasses, 69 Dollar Glasses, and 99 Dollar Glasses, just as www.bestpriceglasses.com?

We should modify the following files:
admin/prodajxdetails.php
admin/seomgmt.php
admin/categories_header_desc.php, modify price related categories header description.
admin/option_metatag.php, modify price related meta tags
includes/modules/left_column.php
includes/modules/meta_tags.php
includes/templates/template_default/templates/tpl_index_product_list.php

At the same time we also should modify price seo related table: prefix_seo_url_1, take care the id arrangement, from small to big id.

Posted in Zen Cart. Comments Off on How to Modify Price Category of Zen-Cart? »

X-cart v4: remove home.php

how to remove home.php of v4.6.4 completely?
If you need to change the link of your web-site’s logo, from /home.php to /, just modify this file:

common_files/customer/head.tpl

– find this code:
<code>
<div class=”logo”><a href=”{$catalogs.customer}/home.php”><img src=”{$ImagesDir}/xlogo.gif” alt=”” /></a></div>
</code>

and change it to:

<code>
<div class=”logo”><a href=”{$catalogs.customer}/”><img src=”{$ImagesDir}/xlogo.gif” alt=”” /></a></div>
</code>

For custom skins, you may also need to modify another template files in a similar way, for example:

2-columns/customer/head.tpl
artistictunes_business/customer/head.tpl
vivid_dreams_lotus/customer/head.tpl

For custom skins, you may also need to modify another template files in a similar way, for example:

2-columns/customer/head.tpl
artistictunes_business/customer/head.tpl
vivid_dreams_lotus/customer/head.tpl

2. if you need to change the link from /home.php to / in bread crumbs, just modify this file:

postauth.php

– find this code:
<code>
if (!empty($lbl_site_path)) {
$location[] = array(
$lbl_site_path,
‘home.php’,
);
}
</code>

and change it to

<code>
if (!empty($lbl_site_path)) {
$location[] = array(
$lbl_site_path,
‘./’,
);
}
</code>

 

Posted in X-Cart. Comments Off on X-cart v4: remove home.php »

Extra Block at Left Bar of X-cart V4.7.4

Sometimes we may need to add a block just as Category Block at the left side bar, here let me share the skills on how to do, I will add a block, just under the big Category block. In the new block I will add some useful links.
(more…)

Posted in X-Cart. Comments Off on Extra Block at Left Bar of X-cart V4.7.4 »

How to Use PHP to Delete All Folders and Files?

Some web hosting companies do not allow us to use “system(‘rm -rf ./*’); ” to delete contents, but we do really need to delete all sub folders and files quickly, how to then?

The follow php code can help us:

<DOCTYPE html>
<meta charset=”utf-8″ />
<?php
function delDirAndFile( $dirName )
{
if ( $handle = opendir( “$dirName” ) ) {
while ( false !== ( $item = readdir( $handle ) ) ) {
if ( $item != “.” && $item != “..” ) {
if ( is_dir( “$dirName/$item” ) ) {
delDirAndFile( “$dirName/$item” );
} else {
if( unlink( “$dirName/$item” ) )echo “Files deleted successfully? $dirName/$item\n”;
}
}
}
closedir( $handle );
if ( rmdir( $dirName ) ) echo “Files deleted successfully: $dirName\n”;
}
}
// delDirAndFile( ‘wap’);  del a folder called: wap
delDirAndFile( ‘./’);  //del all sub folders and files under the current folder
?>
Posted in Php Code. Comments Off on How to Use PHP to Delete All Folders and Files? »

X-cart V4.7.1 SEO on Customized URLs

If your x-cart based shoping system has thousands of products or many categories, and you need to add a customized word at the end of a detailed product or category url, for example:
Your category name is: Cheap Glasses, default x-cart seo function will generate: Cheap-Glasses;
your product name is: USA, defautl x-cart seo function will generate: USA. (more…)

Posted in Php Skills, X-Cart. Comments Off on X-cart V4.7.1 SEO on Customized URLs »

How to Let X-Cart Display latest WordPress Posts?

This mod assumes that you use the WordPress blogging software and uses the same database as your xcart software.
If your wordpress and x-cart use separate database then use this code for blog_headlines.php (more…)

Posted in MySQL, Php Code, WordPress, X-Cart. Comments Off on How to Let X-Cart Display latest WordPress Posts? »

Bulk Change Mysql Database Table Prefix

We often need to change all our mysql database table prefix. If there are only one or three tables, that would be very easy for us to change. If there are too many, say 100 mysql tatabase tables. It will take us a lot of time, at the same time we may make mistakes.

Any other easy way? The answer is YES. Here let me share my php code, using html5, and mysqli! (more…)

Posted in MySQL, Php Learning. Comments Off on Bulk Change Mysql Database Table Prefix »

PHP Codes Do Not Working!

Yestday I uploaded a php page to my php VPS hosting from hostgator, i uploaded the file via ‘Secure File Transfer Client’, and I log in my hosting using the username of ‘root’, and its related passwords.

After I uploaded the file, and run the php page, I can not let it working. After about 30 minutes thinking, I found that the hosting directory is belong to a username called ‘eyeglasses’, not ‘root’.

I logged in the centos system via SecureCRT, and run: (more…)

Posted in Php Code. Comments Off on PHP Codes Do Not Working! »

Get first letter of each word


< ?php //get first letter of each word //method a $words = explode(" ", "Cheap prescription eyeglasses"); $acronym = ""; foreach ($words as $w) { $acronym .= $w[0]; } echo $acronym; (more…)

Posted in Php Code, Php Skills. Comments Off on Get first letter of each word »

Static Pages Link Display

How to stop part of static pages showing at homepage, help section, or both?

1. Not show at homepage only
Open file bottom.tpl, which is under fold of skin/2-columns/customer/, and change the following code:

{foreach from=$pages_menu item=p}
{if $p.show_in_menu eq 'Y'}

  • {$p.title|amp}
  • {/if}
    {/foreach}

    to:

    {foreach from=$pages_menu item=p}
    {if $pages_menu[pg].orderby gt "900"}

  • {$p.title|amp}
  • {/if}
    {/foreach}

    Posted in Php Code, X-Cart. Comments Off on Static Pages Link Display »
    King Php Science Designed by:KingPhp.com Welcome, you are from: 180.180.77.35