Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [script]

The tag has no usage guidance.

2
votes
2answers
27 views

Unlink and link product to category

Need a script where current existing products needs to unlink and link to other categories. let me know the process also
1
vote
0answers
31 views

Magento 2.3 checkout page hang up due to knockoutjs or underscore

After Magento 2.2.4 upgraded to Magento 2.3.0 checkout page is not working. Checkout page hang up browser and showing browser warning to stop it. When clicking on stop it is showing some jquery ...
2
votes
2answers
75 views

How to remove modal.js and its related files

I need to remove modal.js and it's related files all over the website. It is available in vendor directory and I need to remove it from DOM. I found similar question, but no one answered it: How to ...
1
vote
0answers
30 views

Magento 2.2.6: Programatically updating product custom options

I am working on custom script to update product custom options. $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $_product = $objectManager->create('Magento\Catalog\Api\...
0
votes
0answers
22 views

Magento2 How to update product position (number) in specific category by custom script with csv

I would like to set all position sku wise in one specific category using csv here two column data, sku and position. So if anyone has an idea for the custom script kindly reply for me below code ...
0
votes
0answers
29 views

Magento2: custom script for category product sort order position

I need custom script run for specific category products position and use this spreadsheet to change the sort order of the specific category "position" If anyone idea reply me as soon as.
0
votes
1answer
40 views

How to fix error

How to fix error 'Uncaught SyntaxError: Unexpected identifier' var script = document.createElement("script"); script.type="text/javascript"; script.src = 'url'; script.innerHTML="dataLayer = ...
0
votes
0answers
19 views

Magento 2 : Does magento have a standard way of painlessly making and running scripts?

Does magento natively has support for writing scripts, and running them from terminal or cron jobs? Can symphony console component bundled with magento be used to run custom commands to run scripts ...
1
vote
1answer
29 views

Prevent Magento2 display information on script on homepage

I would like to know how can i stop magento2 to printing information about my plugin and script on homepage.If u analyze my code i have got all these script that contain information about all plugin i ...
2
votes
2answers
250 views

php - create csv export file, based on product values

I currently have the following script, that change the producttitle of a product with a specific ID. Now I want to re-write the script, so that it does not update the attributes but generates a .csv ...
0
votes
1answer
16 views

Magento 1.9 save productname using script

I try to save the productname, based on the following script. But I get a TypeError when running the script. What am I missing here? <?php ini_set('display_errors', 'On'); error_reporting(E_ALL);...
1
vote
0answers
38 views

Bash script magento

I created a simple bash script to automate some activities in magento administration. The options that are contained in the script are commands that I execute frequently. Leave your comment if you ...
0
votes
1answer
27 views

Magento2 custom folder php scripts are not being executing 500 error

I have some PHP scripts for creating products using rest api. All the script are under products_create_factory folder and this folder is in magneto2 root. When I execute a script from that folder from ...
0
votes
1answer
103 views

I am not able to reflect the contents added in html head of admin panel in view source code in magento 2

I have added few script tags in the following path of admin panel: content->design->configurations->our theme(edit)-> html head->scripts n style sheets. But it's not reflecting in view page source ...
1
vote
1answer
230 views

How to remove malicious code from the each files of the website magento 2?

I am seeing some malicious code in the website. Each files of every folder is affected by this code. How to remove this code from the website? Is any script to remove or replace this malicious code? ...
0
votes
1answer
31 views

Magento resave all products that are in in price table

We face an issue that not all products with prices are saved in the catalog_product_index_price table. So we want to resave all products that are not in the catalog_product_index_price. How can we ...
1
vote
1answer
55 views

Free Shipping using PHP Script

I have to give free shipping order over 1000 and zipcode range between 600001 to 600010, i am using webshop matrix rate for shipping method, in this case, shopping cart pricing rule not working free ...
1
vote
0answers
35 views

Update label option of attribute

I try to update labels options on my size label in an installer. I use the following code : $attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product', '...
1
vote
1answer
106 views

Magento 2.2.5 shell script PHP Memory size of 2097152 bytes exhausted (tried to allocate 32768 bytes)

I have a magento 2 script which runs through shell so to not have a timeout issue. It uses php multi curl request and it was running fine. But recently asked our hosting server to increase the PHP cli ...
1
vote
3answers
65 views

Magento $product->save() is slower part of script

In my Magento 1.9.1 I am updating the inventory via script. Via this script I update almost 19K products. I have used $product=Mage::getModel('catalog/product')->load($id); to fetch the records ...
0
votes
1answer
17 views

Bootstrap Magento in external script with a second database connection

I use below code to bootstrap Magento in an external script, which works. As an example it gets the name of a specific product. Is it possible to connect to another Magento database (on the same ...
0
votes
1answer
40 views

Magento CE 1.9 Script for setting stock

I need a script that will check all magento products and set them to instock if the qty is greater than 0. The plan is to run this as a scheduled cronjob so that it will be checking for any products ...
2
votes
4answers
343 views

How do I run custom script from magento2 root folder?

Below url throwing Class customScript does not exist error. my test.php and customScript.php are in test folder. Once i run http://127.0.0.1/magento2/test.php, getting "Class customScript does not ...
0
votes
1answer
358 views

Magento 2 import new products with a CSV file and cron job

How to import products with your image and categories from a .csv? I'm using the script: Magento 2 import new and update current products with a CSV file and cron job But I do not work the images or ...
0
votes
0answers
85 views

Adding Cookiebot script to Magento 2

Friends, I am trying to add the script from Cookiebot because they have a good cookie system which meet all GDPR ( General Data Protection Regulation ) requirements. Here you can find the help page ...
0
votes
2answers
53 views

Run magento extension model inside php script

I have a custom extension model like this: app/code/Namespace/Module/Model/Core.php <?php namespace Namespace\Module\Model; class Core { public function save($data){ .... } } I want to ...
0
votes
0answers
218 views

How to integrate the Mailchimp Subscriber Popup into Magento 1.9.x

Hey I was wondering if anyone had any idea why I keep running into a particular issue integrating the Mailchimp Subscriber Popup into my Magento website. I have tried to integrate it by placing this ...
0
votes
1answer
172 views

how i can remove type js from tag

I need to remove JS-type from my script tag(s) for optimization. I am using magento 1.9, and this is a response to the following error: thank you
0
votes
2answers
990 views

magento 2 Programmatically create a credit memo by script [duplicate]

Given an order that has been invoiced (by cash on delivery for testing) and is in state "processing", how can I create a credit memo? in code that is outside of Magento routing EDIT: I have found ...
0
votes
1answer
338 views

Magento 2 - How to update product using custom file.?

How to update product using the custom file from Magento root.? https://www.domain.com/update.php
0
votes
1answer
3k views

How to add a JS script after full loading checkout page?

Since the DOM on the checkout page is loaded in an asynchronous way - I do not have access to some elements. Please suggest me how we can add a custom script to the checkout page after loading all the ...
0
votes
1answer
54 views

Transform root folder script in module more Magento2 “friendly”

I'm trying to adapt some scripts I created (fully functional but not very Magento2) into modules but after many hours of reading, still don't really understand how it works. For exemple, this scripts ...
0
votes
2answers
150 views

Magento 1 get list of all attributes with specific value

I want to get a list of all attributes that do have the value Used in Product Listing and Used for Sorting in Product Listing set to Yes. How can I easliy get all attributes with this value?
6
votes
1answer
761 views

update product programmatically magento 2

Whats wrong in my following code ? I am using a script to insert and update product details using csv. Products are inserting / updating without any issues. But only after updated a product... I ...
1
vote
0answers
436 views

programmatically add color swatches to color attribute Magento2

I am using Magento 2.1.10 and have around 580 different colors in my color attribute. Since the Javascript obviously has trouble showing all of them in the backend (does not matter which browser, ...
0
votes
1answer
70 views

Magento 1.9 database query help

I found a query so I can mass change something in my products description. With this script: <?php require_once('app/Mage.php'); Mage::app('default'); $collection = Mage::getModel('catalog/product'...
1
vote
2answers
1k views

Collection of all configurable products (which has children)

What is the best way to Collection of all configurable products (which has children) with sku using script? How to do that?
2
votes
3answers
450 views

Export simple product using script in magento2 [closed]

How we get simple product collection with visibility 4 (catalog/search) with script in Magento 2?
1
vote
1answer
86 views

Calculate installments on product page

i try to calculate each installment price on product page through php and html. I have add this code but php cannot take the value ($doseis) to calculate it: <?php $_product = $this->...
1
vote
1answer
253 views

Show script on all pages except one

I have this MailChimp embed script (for a subscribe popup) that I want to use on all the pages in my Magento 1 installation, except for one CMS page (because it already contains an embed script for a ...
1
vote
0answers
401 views

How to remove <script> tag if the device is mobile ? M1

I am trying to remove certain dynamic script tags if the device is mobile. I have something like this to start with: Vendor/MobileDetect/Helper/Data.php : <?php class ...
0
votes
2answers
283 views

Magento 2 - Import contacts emails .csv to newsletter suscribers

I have .csv in which have lot of email is exit, it want to assign those email to newsletter suscribers. I have this <?php use Magento\Framework\App\Bootstrap; require __DIR__ . '/app/bootstrap....
0
votes
0answers
148 views

Trigger custom js script by using Magento observer

I need to trigger some custom js script in Magento for following actions, 1) customer account creation (customer_register_success) 2) Add to cart action (checkout_cart_product_add_after) 3) Remove ...
0
votes
1answer
168 views

How to Set Product video url Programitically in magento2.2?

I have created a script for import CSV products everything's working perfect but one issue is product video url not set. <?php use \Magento\Framework\App\Bootstrap; include('app/bootstrap.php'); /...
0
votes
1answer
25 views

I need help with my script

So I have this script: <?php error_reporting(E_ALL); ini_set('display_errors', 1); require('app/Mage.php'); umask(0); Mage::app(); /* tell the browser that we are a csv file */ header("Content-...
0
votes
2answers
91 views

Need help with a script

So I have this script: <?php error_reporting(E_ALL); ini_set('display_errors', 1); require('app/Mage.php'); umask(0); Mage::app(); /* Set our dates */ $fromDate = '2016-05-30 00:00:00'; $...
0
votes
0answers
3k views

Magento2: How to add code inside the head tag?

I'm working on a Magento 2 website and I'm trying to add some code to the head tag, I already tried to add going to Content->Configuration->HTML Head and pasting the code inside "Scripts and ...
1
vote
0answers
303 views

How to update product image based on product name using script. Magento 1.9.2

I want to update the image of one category shoes .In this category there are 10000 products , I want to update the image of those products only which have nike brand in their name , using script. ...
1
vote
1answer
171 views

Magento 2.1 - validate an admin auth token in external script

I need to use admin actions from an external script, currently i post username and password of the admin with every task , validate them, and then do the task. Is there a way to use an authentication ...
-1
votes
2answers
275 views

How to solve Script timeout passed error [closed]

Live site DB import into localhost wamp server, its return Script timeout passed, if you want to finish import, please resubmit the same file and import will resume. Error : How can i solve ...