Woocommerce custom image product thumbnail in cart - php

Hoping to get some help.
I currently have a woocommerce website, the ability to customise a product on woocommerce is limited, so I also have a third-party website for the custom products.
Customer will upload photo, customise their product and I want them to continue the checkout through main website.
Once customer adds custom product to their cart (in third party website) the URL used will direct them back to Woocommerce website.
i.e.
?add-to-cart=product_id&attribute_reference=02&attribute_pricing=99
What I need help with is the image.
It is currently using the standard woocommerce-placeholder.
How would I bring the customers custom product image across so that it is shown in the woocommerce checkout instead of the placeholder img.
Cheers!

Related

Adding Default WooCommerce Shipping to Dokan Vendor Dashboard

We are using Dokan Multi-Vendor plugin for WooCommerce and they have their own shipping module which is not the way we need to work the site.
The users can go into the back-end admin and are able to set the shipping correctly, however Dokan offers a simpler dashboard for the vendors which we want it to integrate with this as users can get confused.
The piece that we want to replicate across looks like the below in the WooCommerce back-end. Is there a hook or code that we are able to expose this in a custom dashboard?
I have found where I would like to add the code within dokan/products/product-shipping-content.php. The Vendor Dashboard looks like below and I want it to slot in to the Shipping and Tax section and to update the same
Talking to support from the plugin support is proving fruitless. Is there a way to display the default WooCommerce shipping methods, as shown in 1st image, within a custom vendor dashboard?
I found a way to do this.
Install the dokan and woo commerce on your WordPress website. And for trial create a user in dokan and a trial product from that user. When we will add or edit the product from it, the dokan redirects us to the products in woo commerce where we can edit the product with the features we want. This is the whole solution!!!
See the video I made for this so that you will understand the solution perfectly :- https://vimeo.com/538650792

Shopify - how to customize buy buttons

I posted this question to the Shopify forums with no response, so I'm trying here.
I'm attempting to embed my Shopify products (preferably as collections) into a > custom themed Wordpress. I've got a working version of the buy buttons and the
subsequent product embed working - but how on earth do I set about
customizing it completely?
Basically, I want the product image, title, price, and "buy now"
button to redirect to the product's Wordpress Page. On that page, I
want a larger version of the product image along with the title,
description, variables (colour/quantity etc), and price calculated
through the variables.
I've been staring at code for three days with no luck. Any help would
be enormously appreciated!
Here is the embed code generated by Shopify:
<div data-accent_color="767676" data-background_color="ffffff" data-button_background_color="7fb466" data-button_text_color="ffffff" data-cart_button_text="Cart" data-cart_title="Your cart" data-cart_total_text="Total" data-checkout_button_text="Checkout" data-discount_notice_text="Shipping and discount codes are added at checkout." data-embed_type="cart" data-empty_cart_text="Your cart is empty." data-shop="copyking-2.myshopify.com" data-sticky="true" data-text_color="000000"></div>
<div data-background_color="ffffff" data-button_background_color="7fb466" data-button_text_color="ffffff" data-buy_button_out_of_stock_text="Out of Stock" data-buy_button_product_unavailable_text="Unavailable" data-buy_button_text="Buy now" data-collection_handle="frontpage" data-display_size="compact" data-embed_type="collection" data-has_image="true" data-next_page_button_text="Next page" data-product_handle="" data-product_modal="true" data-product_name="" data-product_title_color="000000" data-redirect_to="modal" data-shop="copyking-2.myshopify.com"></div>
<script type="text/javascript">document.getElementById('ShopifyEmbedScript') || document.write('<script type="text/javascript" src="https://widgets.shopifyapps.com/assets/widgets/embed/client.js" id="ShopifyEmbedScript"><\/script>');</script>
Unfortunately we don't yet support that level of customization through the Buy Button channel. However, if you want to retrieve the product image, title and price from Shopify and link to another page on your site, you could use the JS Buy SDK. This will allow you to fetch the product information from a collection or list of products (or single product) to render into your own page.
You just have to edit the attribute data-button_background_color, or you can use this Shopify app, it allow you customize the button color.

Add custom product to cart in WooCommerce

I am currently developing an interface that allows you to customize a product. I am implementing on Wordpress, but I need to generate an order after you finish the customization process. So it is necessary that the data is added as a product in the shopping cart WooCommerce. Is that possible? What would be the procedure?
As per your requirements i assume a following scenario
For example you have a site which which sells printed Tshirts.
The flow of this example site is that a user comes selects a tshirt, customizes the tshirt product say by adding Tshirt's color, Image on tshirt and Tshirt's size.
These customization added by the customer at the frontend on product page or cart can be stored in post meta for that order.
So if your case is some what like this then Yes this is possible.
And you can use the following links which will help you to achieve your goal.
How to Add Custom Data to WooCommerce Order
and
Custom WooCommerce Order Meta
Let me know if this solution works for you.

Woocommerce. Have customers add text to product image

I'm making a new WordPress/woocommerce site for a company which are going to sell tombstones and I need a plugin that can write that last greeting on the product image (tombstone).
Can anyone recommend a plugin that can manage that?
You can use a woocommerce plugin called Product Add-ons It costs
$49.00 for a single licence. Below is a screenshot of how it would look like.

Prestashop Product customizer

I have an application which is a T-Shirt customizer which works very good on it's own. But I need to integrate it into prestashop. So after a user uses the application to customize a t-shirt he has to click Add to cart and the product will be added to cart with a custom price and description.
What I need is for this output to be injected into the PrestaShop cart as a custom product with all the custom information and also the generated custom product image to display next to the details in the cart.
So I have the customizer done, I have allready made a custom module and page for Prestashop but I don't know how to integrate it with the cart. My prestashop knowledge is limited.
How can I do this?
When you use this code in CartController.php
$this->context->cart->addTextFieldToProduct($this->id_product, $r["id_customization_field"], Product::CUSTOMIZE_TEXTFIELD, Tools::getValue('product_description'));
then you only save your custom-description in a customization field. But how do you change the price for this customization?
Of course you have to override getPriceStatic method in product.php file to recalculate the custom price. But there is also another problem: what if the customer add same product into the cart but with a different customization and also a different custom price?
Different customization-text is handeled by your used method and is therefor added correctly to the cart, but the different price calculation just overwrites the first custom price because both customizations are associated with the same product.
I did something similar. Here's how I dealt with it.
My module works on its own. I stored customization in the database via object model from the customizer module. Each customization have an ID.
Prestashop offers customization for each products. I hide it from the customer on the prodct page but I use it to store the ID of the customization. That way, you can see in the cart the customization ID for each customized product.
I used _addCustomization method in the Cart object to store the customization ID. Here's a small example:
$context = Context::getContext();
$result = $context->cart->_addCustomization($id_product, $id_product_attribute, 1, 1, $id_customization, 1);
Hope I'm clear enough.
Does this help you out?

Categories