Skip to main content

Questions tagged [function]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers

How to save create og image from featured image in wordpress

I have to create og image url from featured image because along with featured image i have to send text from post title. i have created custom field in editor named as tnation_og_image and i have to ...
Tisha Jhanwar's user avatar
1 vote
2 answers

Argument #1 ($storeId) must be of type int, string given error

I am having a feed which is run every night with crons. My instance is magento 2.4.6-p2. I am using this function to get store id: public function execute() { foreach ($this->...
G. G.'s user avatar
  • 1,142
1 vote
0 answers

Function to get final price of products Magento 2.4.6

I am using the following code to get from magento 2.4.6 product's final price, simple or configurable, to a feed json file. Final price I mean that I need the lower discounted price in product, either ...
G. G.'s user avatar
  • 1,142
1 vote
2 answers

Magento 2 how to overwrite a trait function

How do you overwrite a trait function from vendor. Things i did try in the di.xml <preference for="\Vendor\Module\Traits\Model\ChangeMe" type="\Company\Module\Traits\...
Johan's user avatar
  • 11
0 votes
1 answer

override one of the existing function, how to handle the rest of the function?

HI I was reviewing the code. Does :void mean ignore this function in my override? example: private function clearIndexTable(): void When I do override, I copy the original file and modify. The ...
Paul Fan's user avatar
  • 658
0 votes
0 answers

Is it a bad practice to throw an exception in the plugin?

Let's say one wants to use a before plugin. Also let's say under a certain circumstance it is impossible to do so, therefore we want to throw an exception. However it doesn't feel right to do so; but ...
pro100tom's user avatar
  • 145
0 votes
2 answers

How to extend this file app/code/Magedelight/SMSNotification/Helper/Data.php in Magento 2

I want to extend app/code/Magedelight/SMSNotification/Helper/Data.php this file in my custom module. I have created a module. My di.xml file app/code/Hl/Smsnotification/etc/di.xml <?xml version=&...
Prits's user avatar
  • 625
0 votes
3 answers

How to find how many time function call happened?

I am using cookies to avoid every time function call happens, how to check after created cookies how many times function call happened?
zus's user avatar
  • 165
0 votes
0 answers

Unable to find getPrice method in catalog

Simple issue but can't figure it out alone : Under base vendor/magento/module-catalog/view/base/web/template/product/price/special_price.html There is this part that is used to calculated the product ...
Claims's user avatar
  • 1,164