Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Removing Letters From Numbers Rate Topic   - - - - -

 

Posted 23 February 2019 - 07:33 PM #1

Hi

 

I'm trying to do a sum but the problem is that there's letters on it so it dose't work. Can anyone help me.

{math equation=$products.product_code+1 assign="sku_code"}

The product code is OG008456, so the results should be OG008457 but it comes up with 1. Dose anyone know I can remove the OG from the equation?

 

Thanks



 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 451 posts

Posted 23 February 2019 - 08:02 PM #2

Append it as prefix.



 

Posted 23 February 2019 - 08:45 PM #3

I'm not to sure how to do that.



 
  • imago
  • Senior Member
  • Members
  • Join Date: 18-Oct 18
  • 451 posts

Posted 24 February 2019 - 07:33 AM #4

See this

https://marketplace....ku-or-code.html

 

or search for Product Code



 

Posted 24 February 2019 - 06:10 PM #5

Hi

 

Thats not what I want or asked, but thanks for you help all the same.



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19144 posts

Posted 25 February 2019 - 07:37 AM #6

Pay attention to the PHP intval function

{$intval = $products.product_code|intval}
OG{$intval+1}

GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.