jkmagic Posted September 3, 2010 Share Posted September 3, 2010 hi!i need to put a referance link somewhere in product info like the 'location' filed.the referance isnt acceptablepresta says when i save in BO :1 error 1. the field location is invalidit seems that some characters are not allowed,so how can i put the referance link into the product?the lnk is like :http://localhost/rest/category.php?id_category=11I also attach attach a pic to see it Link to comment Share on other sites More sharing options...
jkmagic Posted September 3, 2010 Author Share Posted September 3, 2010 noone?Its so difficult?I wish i knew some programming Link to comment Share on other sites More sharing options...
rocky Posted September 4, 2010 Share Posted September 4, 2010 It is line 413 of classes/Validate.php that validates the location field: return preg_match('/^[^<>;={}]*$/ui', $reference); Try changing it to: return preg_match('/^[^<>;{}]*$/ui', $reference); This should allow the = character to be used. Link to comment Share on other sites More sharing options...
jkmagic Posted September 4, 2010 Author Share Posted September 4, 2010 Thanks Rocky! it worked! Link to comment Share on other sites More sharing options...
jkmagic Posted September 5, 2010 Author Share Posted September 5, 2010 Rocky if you are seeing this..........If any other can help.....!Another problem came over.When i put the code with {$product->location} in product.tpl its ok with the referance.It sees itBut when i put the code in the product-list.tpl it doesnt see the referance.How to put it to see it? Thanks Link to comment Share on other sites More sharing options...
rocky Posted September 5, 2010 Share Posted September 5, 2010 It's because product.tpl uses a single product object, whereas product-list.tpl uses an array of products. You should use the following code instead: {$product.location} Link to comment Share on other sites More sharing options...
jkmagic Posted September 5, 2010 Author Share Posted September 5, 2010 Rocky you are big.You have saved me once again.thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now