If you encountered a bug in magento that says:
View Source
Print?
1Method varien_object ::__ tostring () cannot take arguments
And you have PHP 5.3 or newer then you have 2 options:1) downgrade to PhP 2.92) fix the bugsIf downgrading is not possible try doing these changes in magento files:
File:/Lib/varien/object. phpOriginal:Public Function ___ tostring (array $ arrattributes = array (), $ valuesepa
The export function of the Magento 1.x makes it easy to derive data from products and customs, but there are several disadvantages (or inconvenient) places:1. Exported by default. The CSV file is encoded in UTF-8 format, and the default encoding format for MS Excle is Unicode, so the exported. CSV file opened directly in Excle Chinese will be garbled, garbled not only will cause Chinese cells can not read, and will affect other cells, will make other
If you need the Magento permission setting and cache cleanup instance code in the PHP script, refer to the. PHP instance code as follows :? Php # set file 644, directory 755functionn... PHP script to implement Magento permission settings and cache cleanup instance code. if you need code, refer to. PHP instance code as follows:
IsDir () chmod ($ path, $ dirModes); else if (is_file ($ path) chmod ($ path,
: This article mainly introduces how to make Magento's newly uploaded products appear at the top of the category Display List ?, If you are interested in the PHP Tutorial, refer. In the actual environment, this situation occurs. after a product is added, but on the product display page, the first added is always in front, and the last added is sometimes displayed on pages, this is because magento products are listed in ascending order by default. that
Can use the article, blog page to do long tail keywords
Make an article box on each page, and the article appears so that you can update the page.
Search page in robots.txt settings do not let crawl
URL rewrite on, use absolute address (this should be no problem), URL standardization, avoid multiple URLs to a page, resulting in a decentralized weight
404 Production of the page
Place statistical code, using Google's statistics
Robots.txt is set to not write.
Local.xml set to
Magento 2 Background Access block page error, unable to access, has been loaded to ask the big God answer?Browser tipsVm10948:1 uncaught syntaxerror:unexpected Token
69
3099
3423
3453
Reply content:
Magento 2 Background Access block page error, unable to access, has been loaded to ask the big God answer?Browser tipsVm10948:1 uncaught syntaxerror:unexpected Token
69
3099
In the development and template debugging Magento need to add some categories and products, wait until the site is officially online when it is a very troublesome thing, so I wrote a PHP, for the removal of products and classification
$path = Directory of "/var/html"//Website
Include ("mysql.class.php");
if ($_post[web]) {
$web =$_post[web];
$xml =simplexml_load_file ("/$path/$web/app/etc/local.xml"); Reading an XML file
$dbname = $xml->
1, recently encountered such a problem in the Magento project (the contents of the error log):
a:5:{i:0;s:69: "Item (Mage_salesrule_model_rule) with the same ID" "already exist"; i:1;s:5399: "#0/home/websites/ blueberrypet/com170/lib/varien/data/collection/db.php (576): Varien_data_collection->additem (Object (Mage_ salesrule_model_rule)) #1/home/websites/blueberrypet/com170/app/code/core/mage/salesrule/model/validator.php ( : Varien_data_collection_
Some categories and products need to be added during magento development and template debugging. it is very troublesome when the website is officially launched, so I wrote a php file myself, used to clear products and categories lt; formaction quot; method quot; post quot; gt; Entercheckproductweb :...
Some categories and products need to be added during magento development and template debugging. it
1.Magento with the shell at the time of indexing, sometimes error:
General error: 1205 Lock wait timeout exceeded
This time, because of the reason for the row lock, in the table you directly use SQL to perform the update, will report this error, that is, this error is MySQL newspaper.I need it. Table Index_process UnlockIf you want to quickly solve, then, the table import, modify, delete the database index_process table, re-import, OK, row loc
This article will show you how to get the quantity and price of the shopping cart products and how to use Magento. I will give you a detailed introduction below.
Obtain information about all products in the shopping cart.
The Code is as follows:
Copy code
// $ Items = Mage: getModel ('checkout/cart')-> getQuote ()-> getAllItems ();$ Items = Mage: getSingleton ('checkout/session')-> getQuote ()-> getAllItems (); foreach ($ items
Magento Mobile Admin650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/89/0C/wKiom1gF7Q6jwtXbAAD3n-kfBMI102.png-wh_500x0-wm_3 -wmp_4-s_3903577549.png "title=" Logo2_7_1.png "alt=" Wkiom1gf7q6jwtxbaad3n-kfbmi102.png-wh_50 "/>by phone automatically (iphone,ipad,android Mobile or PC/MAC), your inventory and product prices. define attributes, barcode numbers, and products assigned to you. open Mobileadmin and go to inventory.Scan barcodes with USB
(1) Installation Magento times lack of PHP extensionsInstall the corresponding extension(2) Some directories are not writable when installing MagentoTerminal Run command changes file permissions for root directoryChmod-r 777 {Directory Address}(3) After changing the file permissions, git prompt file changesNeed to modify git local configurationTerminal open git local configuration fileVim. Git/configModify FileMode = False(4) 502 ErrorFPM not installe
The default Magento only has the English language pack, so if you want to also display Chinese, you will need to install the Chinese language pack.Steps:1. First, go to http://www.magentocommerce.com/langs/list/download Chinese package extract to Magento directory, it copied to two directories: one is app\design\frontend\default\ Default\locale, the other is App\locale.2. Go to System--configuration, then t
Often someone encounters Magento backstage, entered the correct account password. Do not log on properly, and do not prompt for errors. is to continue to jump to the login interface.
There are many solutions on the web, most of which are to comment out a piece of code.
I am a stand-alone server, according to the online method, annotate the code, also can not log in.
Then I emptied the cache and after the session. Can log in. But only for a while. A
The idea is that, to generate the order number, the theory is to generate the order code when the order is saved. So trace the code to the Mage_sales_model_order Save () method. And then tracked down to mage_sales_model_resource_order_abstract this, in view of the characteristics of Magento, or mainly to see _beforesave, save,_aftersave these 3 things are almost, and check to see if there are events,
It is found that the _beforesave of this class is
In any fast iteration project, it is a headache to ensure the synchronization of development and production (current network) databases. Magento provides a system for creating resource migration versions, which can help us deal with this problem that is constantly encountered during the development process. Www.2cto.com we created the weblogpost model last time. This time, we execute create table directly. We will not create a Setup Resource for our m
Magento adds the "new" or discount quantity label magentonewlabel. discountlabel to the product. The bottom of the article is. Add a new tag to the new product. Shows the quantity of discounts for discount products. You can add a piece of code to the bottom of the cata article in the template folder.
Add the "new" label to the new product. Shows the quantity of discounts for discount products.
You can add a piece of code to the catalog/product/list.
Step I Add a occupation/title field to the user registration page, almost 54 lines in register.html, add a occupation display code below the email
Code:
This is, if you go to the User registration page, you will see the new fields. Step 2 Also in edit.phtml, add occupation display block
Code:
Step 3, open model/entity/setup.php almost 93 lines, below the email, add the relevant code of
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.