How to create custom option programmatically while saving product in magento - magento-1.9

In magento, i want to create custom option while saving product.
Actually for specific category's product i want to create custom programmatically.
Please also let me know in which file i have to write script.
Thank you

Related

Using BIM 360 Docs API Is there any way to create project with existing project settings?

In the BIM360 docs account, our requirement is to create a project using API with existing project settings. i.e suppose we have already one project exists in which we have created all custom attributes for issues in a project admin and set some permission. We want to create all these attributes automatically while we create a new project, using this existed project.
Yes, you can create new BIM 360 projects from a template project. If you check the sample setup tool at https://github.com/Autodesk-Forge/forge-bim360.project.setup.tool, you can see that it provides the feature to create a new project by copying the folder structure and folder permission from a template project, but you can't setup the custom attributes automatically at this moment because the API to create custom attribute is not available yet.
If you are interested in the new Custom Attributes API, please check it here, be noted defining a custom attribute API is still working in progress.
Hope it answers your question.

Can I provide a HTML form for users to upload directly to S3 and can I create new sub folders for users?

I need to be able to provide an HTML form that allows users to upload a file to a particular bucket. I also need to be be to create a sub folder within the Bucket which relates to the users email (passed from the form). If the sub folder exists then upload the file otherwise create a new folder etc.
You can use php to do that. I wrote a phone script sometimes ago that can upload any image, resize it and even move it from one folder to another, If I happen to come back online, I could upload the script but you might need a little php experience to use it. So I suggest you try to learn php, most importantly OOP

Importing Excel Spreedsheet with external site

I don't know whether this is good place to ask such question but I help need to know is it possible to get excel data from a site which have login credetials and in that in a specific tab to get updated excel data.
Site is like this way: (Example)
www.abc.com/Login
I enter my login credetials and after that I go to specific tab such as Export Data tab then I select the criteria then I click on Download Report.
I wanted to have is to update google spreedsheet to that updated report. Is it possible to do via google script?
If this question should not be posted then please let me know I will delete it rather than to downgrade this post. If this should not be posted then please guide me with the other external site where I can post this question and get help as I badly need help with this.
Other than that if you have question or any clarification please ask.
Extended Description
Let's say I have a site
Steps:
Go to the site (Example: https://datatables.net/extensions/buttons/examples/initialisation/export.html)
Assume that you have to login to that site
After login to to the tab call Basic Initialisation
You land on that page, on that page you have some drop down list which you select and then you click on export excel.
The excel file which can be exported that excel I would like to import to my google drive if possible via Manage Version.

Is it possible to store view code in files?

Right now I enter view code (map & reduce) in the couchbase UI. This is very inconvenient, and I was wondering if there is a way to make couchbase scan the code from a folder?
This will allow me to put this code under version control, and allow me to create a script that copies code between environments.
I dont know of a 'native' way to store views in files, but you can add and remove views via REST. So you could implement a workaround.
Views REST API

Changing Fusion Table Card Layouts Programmatically

While creating a staff database using Fusion Tables and Google Apps Script, I am trying to leverage the existing Fusion Tables UI as much as possible. Cards have been very useful but I am looking for a way that I can programmatically change their layout.
For each entry in the database, a user can upload relevant documents and attach them to an entry. The files are stored in google drive and a link to that document is stored (as an html string) in one of the database fields. Here is a simple image of what that may look like and the layout code to make it.
The problem is that the uploadable files (and fields) are dynamic. The user can add or redefine those fields through my ui and I need the full list of available files on each card to adapt accordingly so I don't have to manually configure the layout each time. How can I create a list of links on the card?
Other background info:
The fusion table will be view only. I haven't figured out a way to validate data entry in the fusion table ui so data entry will be done programmatically and in a custom ui.
I understand that my current method is not very robust and I am very open to other ways of providing access to these files through the card. I've even toyed with the idea of having a general html field for each entry which is programmatically created to display what I want. I'm just hoping there's a better way.
P.S. I've been struggling with reputation limitations for posting links and images. If you think I'm reputable, please help me out.
The problem is that the uploadable files (and fields) are dynamic. The
user can add or redefine those fields through my ui and I need the
full list of available files on each card to adapt accordingly so I
don't have to manually configure the layout each time. How can I
create a list of links on the card?
I may not be exactly following, but it sounds like your app can change the schema for each user? That's what your sample info window HTML seems to show. But that would require a separate table for each app user. If that's not the case then I'm not clear how you are using the term "field".
In any case, the Fusion Tables API does allow you to change template contents, which may solve your problem: https://developers.google.com/fusiontables/docs/v1/reference/template