Welcome Guest, Not a member yet? Register   Sign In
ci cart help needed with regexp
#1

[eluser]bgreene[/eluser]
Hi, I just discovered the hard way that the cart rejects a product with names containing eg slash (often used in product names eg cream/offwhite etc). Not being good on regexp and in need of a quick fix, can someone tell me the preg_replace formula for "replace any char not in $this->product_name_rules with space". This would be imo a nice line to insert in cart at circa line 193 and maybe also put a note in the user guide that such characters are not allowed. another nice change would be to include
Code:
if (! isset($items['qty'])) $items['qty'] = '1';
at circa line 152. the 2 changes would make it a bit more tolerant to errors
many thanks, Bill




Theme © iAndrew 2016 - Forum software by © MyBB