How to pass optional attribute to the Product via custom add to cart in Prestashop 1.6 - prestashop

I wonder if there's a way to pass some extra information (attribute) by using custom add to cart button.
We've got clear products with their prices. We also sell the same products with print.
Printed version is more expensive. The product is going out from special generator and there, "add to cart button" will be added to where -if that's possible- I would like to pass attribute to this product (so I could change base price to printed)
Is there any way to pass/add this attribute to the product before it will go to cart?

I think the best way to do that would be use combinations - you can make combination with different prices and then you will be able to send combination_id using your extra button.

Related

How can I create a metafield with the type: product, for a shopify input?

I have made several metafields with the type as product, so I know they work, but in this section they don't show up for this link. I can hardcode the link to a specific product, but I want it to be dynamic using metafields. I'm using the palo alto theme.
and this is the result when I click the dynamic source button:
I'd rather leave any theme customization or coding as a last resort.
A link would take a metafield of type url but you are trying to add a metafield of type product. Type product stores the product object with all its data that's not what you need here if you just need to link to the product page.
Id just set up another metafield of type url and pop the url of the product in there.
I'm not familiar with where you are adding this in the Palo Alto theme but unless this is a section that appears on multiple pages, like product pages or blog pages, where you need to link to a different product on each page you may not need a metafield at all.

OroCommerce: Configurable Product display in storefront and backoffice

I've created configurable product (internet connection with different speed) following docs, in storefront I see dropdown with product vairants, all is ok.
But in backoffice (when editing shoppingList or creating order) there is always only one variant of product with no ability to quickly select another option (eg change speed to another one) - is this how oro backoffice works and nothing could be changed to make backoffice user quickly navigate between product variants (eg change speed from 1M to 2M by clients phone request)?
Cant even edit product in shopping list
UPD:
If there's no way to see user-friendly configurable product in backoffice than I need to implement smth like button near each product in LineItem which will show popup with product variants. When user will select another option request will be sent to some route and it will run smth like $lineItem->setProduct($newProduct); , grid reloaded and new product variant selected. Is it ok or it will break something in oro?
Where to start for adding that button and popup? Eg I cant edit oro shopping list template, how to properly extend it?
On the line item editing form you cannot change the product, no matter it's configurable or simple. It's done intentionally.
If you want to change the product, you always can remove a line item and add the new one with updated options manually:

Shopify custom bundle: Products listed as line item properties and inventory update on order

I'm making a custom bundle "builder" with Shopify Theme Sections for my client and I managed to add products from the bundle as Line item properties (it's easier to remove it as only one item, then as 5+ items). Now I'm not sure how to finish the order process and update the inventory of the products listed as line item properties.
How to "connect" the Cart and Checkout pages and transfer the info about the products, so it can affect the inventory after the order is finished? Should I add a hidden fields on the Cart page (for those products listed as the properties), or should I do something else (e.g. add a Private app with some hook that'll update the inventory in the background or maybe add all products to the cart page and hide them with JS and add some logic for their removal)?
Here is the checkout screenshoot as an example - https://www.dropbox.com/s/j6cu985wcpfp4t9/shopify-cart-products-as-line-item-properties.png?dl=0
Thanks in advance!
You are on the right track. You cannot do hidden products or line item properties though. Instead, when you add a bundle to the cart, add all the products in the bundle. That is how you accomplish a checkout. Tie the items together using Line Item Properties, and you can handle delete/remove/update code in the cart with JS. Since the customer would be buying products, inventory is then automatic.
You cannot escape having the customer seeing an paying for a variant ID, with a quantity and a price. Trying to hide that in a bundle will never work, although you can be creative and disguise line items as being together with good code.

Add custom fields on adding product in shopify

How to add some extra details while adding products?
Currently I am able to add Variant in Product which shows an input field for the product in product details page. But then, I require to add the same Variants for all products.
My Requirement was to add custom field, e.g. Weight, Height, Wood Type, Color etc. that would appear for all products that are of category Table.
Is this possible some how?
This can be accomplished by creating a new template for your product. You can find some documentation for manually configuration additional product options here.
Most merchants on Shopify use apps to avoid manually configuring additional product options.
A simple task for you would be to add the information using the API for metafields since you are saying they are to be added to all the products. More information on metafields API and liquid are in the links below
Metafield Object and Metafield API
If they are only a few products, you can give this app a spin - ShopifyFD
If the different fields affect the price, create variants. Metafields can also be defined at variant level.
Product metafields can be managed from the Shopify adminpanel directly. You don't need a third-party app or chrome extension anymore!
From the adminpage, go to settings (bottomleft corner) and go to Metafields. From there, you can add the metafields to the product and set the desired contenttype (inputfield, image upload, checkbox, etcetera)
You will need to provide a namespace and key, which you can refer to from the code template. For instance: setting the "namespace and key" field to my_custom_fields.somefield, you will be able to access it from the product template file (product.liquid) like so:
{{ product.metafields.my_custom_fields.somefield }} or, of course, assign it like so:
{% assign myField = product.metafields.my_custom_fields.somefield %}
The created metafields will appear on the product editpage at the bottom. No chrome extensions needed!!
The accurate answer to your question is NO, You can't
But, the good news is there are some apps to accomplish the result. Here is one of the apps which is free!

Prestashop : Adding a field to choose Shipping carrier in product page front office

I'm using PrestaShop 1.5.5.0.
I want to add a custom check box list to the product page so a customer can choose shipping carrier on the product details page. Can it be possible ? I can add a specific fields in the product details page. As I'm new it's little difficult for me to figure out how can I add other details and carry the values to the order page and that is also dynamically. Is there any module available by which I can accomplish the task ? Please suggest me.
What I want to do is this : Choosing shipping carrier in product page :
http://www.wayfair.com/LifeStyle-Solutions-Zurich-Platform-Bed-LS3-ZUR-X-CP-LF1087.html
Well It's a tough task. You need to work on the controller if you want to carry the values or create a module like shipping estimate and hook it to the product page that might work.