We have a site which will sell products which sometimes will have custom prints. It can be any kind of product. There will be two kind of products. A product can be both name and image product at the same time. In such case both “change name” and “upload image” will apply.
We will have different products where the visitor will be able to change the name printed on the product. Let’s use the baby pacifiers as an example.
If a product is a name product or not is determined by if that product has a tag with the name “name product”. The above image is a baby pacifier without customization (the name field). Every product has an image of the product as is looks without the custom name.
In the product page we want to add a text field and a button which you can change the custom name with. Once the custom name is changed it will be stored as a session value / cookie in Woocommerce. From now on every name product will generate the product image based on that session value.
To be able to generate beautiful looking name products the following meta data must be added to every product (can be done with custom fields).
• X/Y-coordinate of the midpoint of the custom text
• Font (or fonts) which are allowed to be used with this product
Array of key/value pairs which describe number of allowed chars for each font size. The name Ella might be used with a 24pt font size, but the name Alexander have to be in 18pt
• Allowed font colour (or colours) for that product
When the customer presses the “Change name”-button the product images will be dynamically created server side and reloaded. The image can be cached for same product/name combination to ease the payload of the server. It is important that the text looks like it is a part of the photo and not added. The edges of the font should be smooth. If the customer has not yet added a name value, there should be a default example name like “Your name”.
When the customer adds a product to the cart, they add the current name value when they click “add to cart”. If they change name after that, the name of the products in the cart will not change. Here is an example. A customer with two children visits the store. First they change the name field to “Lisa” and browse the product list and adds two products to the cart. The two carts products should now be associated with the name “Lisa” and it should show somehow when the order is made because the products need to be printed with the name “Lisa”. But before the customer checks out he change the name value to “Eric”, because he wants to order two pacifiers to his son Eric as well. In the card there are now 4 products, two with the name “Lisa” and two with the name “Eric”. How the names are stored to the ordered products is not that important. The main thing is that when warehouse staff should print the products they need to know what product design and what name to print on it.
The second type of product is an image product. If a product is an image product there should be image upload form close to the “add to cart”-button. If a product is an image product or not is determined by if that product has a tag with the name “image product”. In the same way as the name product the uploaded image will be stored in the session and showed automatically in all other photo products until a new image is uploaded. If an image product is added to the cart it should be associated with that particular image. In the database an ID-number of the attachment ID or similar is ok.
The area on the product image where the uploaded image should be shown will have a key colour (for example blue or green) and that color will be replaced by the uploaded image when the dynamic product image is created. It should be possible for the customer to rotate, crop and place the uploaded image.
24 freelancers están ofertando el promedio de $192 para este trabajo
Hello Let's explore the requirement and kindly let us know if you would like us to share our skills & experiences with previous development. Thanks & Regards Moumita