Categories
Mastering Development

Trouble with nested ifelse statement in R

I’m trying to run a nested ifelse statement in R. Here’s a look at the structure of my data using the glimpse() function from the tidyverse: Rows: 22,104 Columns: 9 $ `Formation/Locality` <chr> “Montmartre”, “Montmartre”, “Montmartre”, “Fur”, “Me… $ Location <chr> “Ile-de-France Region, France”, “Ile-de-France Regio… $ Environment <chr> “terrestrial”, “terrestrial”, “terrestrial”, “offsho… $ `Palaeolongitude(N/-S)` […]

Categories
CMS Magento Mastering Development

Magento 2 split order based on product attribute

I’m developing Multivendor masrketplace mdoule. I need to split orders based on seller id’s which assigned to product. I tried using this free module. Link But this is not working with attributes. So I tried to split with sku. Where I modified the code like below. <?php namespace Magestat\SplitOrder\Plugin; use Magento\Quote\Model\QuoteManagement; use Magento\Framework\Exception\LocalizedException; use Magento\Quote\Api\CartRepositoryInterface; […]

Categories
CMS Magento Mastering Development

Magento 2 split order based on product attribute

I’m developing Multivendor masrketplace mdoule. I need to split orders based on seller id’s which assigned to product. I tried using this free module. Link But this is not working with attributes. So I tried to split with sku. Where I modified the code like below. <?php namespace Magestat\SplitOrder\Plugin; use Magento\Quote\Model\QuoteManagement; use Magento\Framework\Exception\LocalizedException; use Magento\Quote\Api\CartRepositoryInterface; […]

Categories
Mastering Development

WooCommerce I need help to get a value for an additional user field

In woocommerce, I’m trying to add additional code to a existing php code, that stores an value to an advanced customer field in the db. As you can see I calculate the value “Kontostandeintrag” as a result of an addition of different values and store this value in the post_meta in the Field “Kontostandeintrag”. I […]

Categories
CMS Magento Mastering Development

Magento 2 split order based on product attribute

I’m developing Multivendor masrketplace mdoule. I need to split orders based on seller id’s which assigned to product. I tried using this free module. Link But this is not working with attributes. So I tried to split with sku. Where I modified the code like below. <?php namespace Magestat\SplitOrder\Plugin; use Magento\Quote\Model\QuoteManagement; use Magento\Framework\Exception\LocalizedException; use Magento\Quote\Api\CartRepositoryInterface; […]

Categories
Mastering Development

R Group character strings based on numeric value and word

I have a dataset that contains Names as strings with year, order, and grouping name. Each Name has a value associated with the name. I need to reorder the ‘Names’ based on ascending year/order per grouping name and assign a value that is the average within the group. My issue is further complicated by some […]

Categories
Mastering Development

Display product ACF fields on a specific WooCommerce email

So I almost got it, but this last detail of specifying WooCommerce emails is leaving my head in a bit of a knot here. I need to show ACF (advanced custom fields) fields of products (in this case it’s a custom shipping time) But only in the new order email (processing order and waiting payment […]

Categories
CMS Magento Mastering Development

str_replace strange behavior

In my codebase I have a line of code, which is triggered through a cron const SALE_ORDER_NR = ”; $text = str_replace(self::SALE_ORDER_NR, $order, $text); I am using Magento 1.9; Here, $order is of type : Sales_Model_Order $text is not having any substring as , instead it is : Refund of Rs.150.00 for your order 145004617 […]

Categories
CMS Magento Mastering Development

order_totals not print in email template magento 2.3

i have create on phtml file in my custom module to print some info about the order, all have print but order_totals are not printed, i have call that phtml file in email template like this and my phtml file code is.. <?php $_order = $this->getData(‘order’); ?> <?php if ($_order) : $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $orderInfo […]

Categories
Mastering Development

How to find the distinct row of max value which have unique phone number [duplicate]

My table is below Name,id,order,Phone Ada,52,Ball,123 Ada,55,Pen,123 Ada,67,Ball,789 Mak,58,Book,345 Mak,60,Cho,345 How to get the all the rows of max value if the phone number is different My expected out Name,id,order,Phone Ada,55,Pen,123 Ada,67,Ball,789 Mak,60,Cho,345 find the distinct name with id(max) having same phonenumber