When can a shopify field connect to a dynamic source? - shopify

I have added a text input field to my page template, in the hope of linking it to a metafield I have created within the page.
When editing the page template, the input field does not have the icon to link to a dynamic source.
Is there anyway I can make the connection for the page metafield through the template editor?

There are no connections from a Shopify Page to a Metafield for saving. They would be read-only. If you require to save information and write it, you would have to wire up your own App Proxy based save App.

Related

Render as HTML the line_item.properties data who has HTML values in it on Shopify Admin Orders

Hi so I'm wondering If it is possible to render these custom line_items.properties value as HTML in my orders? in shopify, as of now it appears like this when the order is viewed. The object value is not rendering those HTML tags.
I'm using the format below to submit the order onto my Shopify account and I was kinda hoping it will display a View Image link.
properties: {
sample_image: "View Image"
}
I solved it, so what I didn't know by then is that shopify already handle this kind of data. If the lineItem.properties has a value of URL or any kind of link, shopify will automatically add an anchor tag to it.
So instead of adding an anchor tag to the lineItem.properties, just use the ordinary link/url and that'll do the job.

Magento 2.4: How to hide the Upload button in magento 2 admin?

We have an image uploader field in Magento 2 admin. When a customer uploads any document in the frontend, the file will be shown in uploader field section. Now what I need is that I want to hide the Upload button in admin and have to restrict admins to upload the attachment from admin portal.
I have tried visible=false but its hide the entire section.
Please help
Is it core Magento or Your custom uploader? Is this menu build in xml? Is it uicomponent? Seems like You want to conditionally disable element. Maybe this would be helpful:
https://karnowka.com/posts/magento2-conditional-layout-directives/
It all depends how You build the buttons. Every xml has xsd schema, that means each one has different possibilities but only few allows to conditionally hide element.
Maybe You can use:
<item name="formElement" xsi:type="string">hidden</item>
or disable element in xml.
Anyway if it's adminhtml I would start looking at xmls.

Shopify - is it possible to change the preview of a product with a inputbox?

Which ways are possible to edit the live preview of the product page in Shopify with Inputboxes next to it?
Let's say the product is a poster, and i want to add a custom text on it.
When typing into the inputbox the text changes in real time on the product.
Can this be implemented in the shopify code with the basic version of shopify?
Or does this necessarily needs an app?
ADDITIONALLY:
Let me go a bit deeper. I have a code that can generate a QR code.
Now i want that the QR code to be previewed in the product. Now position and color of the QR code is different from any product. Would that need an app?
Yes you can to an extent.
First the ground rules:
You can't modify the product from the front-end and update the content or media in the back-end - this would be a huge security hole
The changes applied to the product will be visible only to the user who changed them
The solution is to use Javascript and update the content of the front-end. If you like to store the changes for that specific user you can save them as cookie or localstorage.
If you like to share this change to other people you will need to add a custom parameter in the URL of the page and generate the content from it and share that url.
Each one of these steps will require some custom Javascript that will affect only the user in question, if you like to modify the product in the back-end directly you will need some kind of an app for this.
On my mind it can be done if the dynamic text is applied over product image.
Detailed code would be too long to write here but here are the steps:
Add an input to your product form to add a custom property (https://community.shopify.com/c/Shopify-Design/Product-pages-Get-customization-information-for-products/td-p/616503)
Write a Javascript function to get input value in real time
Use this value to display it in a div in product image container
Position this div in CSS as absolute and style it as you wish
While image container position should be set as relative in CSS
HTH

Creating custom product page on BigCommerce

I'm trying to create a modified product page in my BigCommerce Cornerstone theme and I'm following the video on the following link:
https://stencil.bigcommerce.com/docs/custom-layout-templates
The video claims that I need to use a live URL when I create a new HTML under /template/pages/custom/product and map it in the .stencil file.
The way I created a new live URL is that I created a completely empty web page. The first difference I notice though, compared to the video is that when I navigate to the page it's not completely empty as shown in the video but shows the header and footer of the website.
When the video asks to copy the contents of the original product.html into my newly created HTML under /template/pages/custom/product, the HTML markup doesn't get picked up i.e. the page will not show components of a product page.
I got stuck at this point and cannot continue with modifying the template.
If you are creating a custom product template, you would need to map it to the live URL for a product in your store. Mapping a custom product template to a web content page won't work.
It's important to note the difference between page types. If you are creating a custom category template, you would map it to an existing category page in your store, etc.
After you map the product page URL in your .stencil file, be sure to restart Stencil CLI. You'll need to restart to see the changes reflected on localhost in your browser (i.e. a blank page at the product page url if you mapped an empty html file to it).

Shopify: Change metafields for store

My problem is that when you login on my store - you (not necessarily registered) could add your e-mail and other information.
In this topic:
https://ecommerce.shopify.com/c/shopify-apps/t/allowing-a-customer-to-edit-their-profile-and-metadata-186665
I see that there is a possibility to change the metafields of the customer.
But I need to change the metafields of the store.
Does someone know where to find a list of requests or is there any options to change Metafields?
If you, as somebody with admin access to the store, needs to manually set or modify metafields on your store and either don't want to (or cannot) use a custom app to do so:
Get the (free) ShopifyFD extension for your browser (Link to the extension on the Chrome store)
Log in to your store and go to the 'Settings' (gear icon)
Click ShopifyFD's green '+' icon in your browser to load the extension on the page. You should now see your store metafields appear
You can now add metafields by filling in the boxes, or select existing metafields to manually edit their values.
Note: Metafields that are set by any of the apps that your are using should generally not be edited manually - changing an auto-generated field could really confuse the app that relies on it!