PHP Function that extract stock status
$10-30 USD
Pagado a la entrega
I’m looking for a PHP function that use product ID (SKU) as input and that revert an associative array using product sizes as named keys and TRUE or FALSE if the product is available in stock or not.
Example, the function receive 1903100-2100 as input and revert the array like the one below:
Array
(
[XS] => FALSE
[S] => TRUE
[M] => TRUE
[L] => TRUE
[XL] => TRUE
[XXL] => TRUE
)
Since the product sizes might differ the function array have to be dynamic and revert either with a wider or more narrow number of alternative product sizes.
Function input: Product ID ie. 1903100-2100
The URL that is used for searching is currently, where q = the product ID: http://www.craftsportswear.com/produkter/#q=1903100-2100
The search result might revert none or several products, if that’s the case have the function revert FALSE. The function should only return an array with sizes and product status if just one product is found. ( 0.14 into the screen capture )
Displayed products will show their product URL in source code as "<a href="/craft-e-commerce/baselayer-1/keep-warm/1903100-4050/“, there will of course be more non relevant code both before and after but a regex similar to $re = '/ef="(\/.+\/)' . $productID . '/‘; should do the trick.
The product page will display a table with information what sizes that are available, the ones that are greyed out should be set as FALSE in the array. The ones that are greyed out got the product_matrix_cell disabled in the source code. ( 0.23 into the screen capture )
Nº del proyecto: #12265083
Sobre el proyecto
9 freelancers están ofertando un promedio de $27 por este trabajo
I have good knowledge of PHP. I able to do this task very well with good quality. our main motto is client satisfaction and make a long term relationship with you. Thank you
I understood what you wrote. You want the array to return key as size and true/false as status of stock. I will do it in 2hours. I am enjoying working in PHP, JS, MYSQL etc for more than 4years. I can do it. Thanks
Hi! I have read and understood your basic idea of the project (the proposal in other words), and I think I'm fairly capable of completing it within say 2-3 days. If you are interested, make sure to drop me a PM.
Hello If the explained sku work is still on I want to work on it and code it. I have 6 plus years experience in php related projects. Thanks