"TRON" is an Ethereum blockchain-based decentralized entertainment protocol and "TRONIX" is a cryptocurrency token launched by it.

Buying crypto like Bitcoin, and exchanging them to TRX is the most popular way. Decentralised virtual-gifting platform Gifto has also partnered with TRON to monetize decentralized content.


Read more

Special Price Not Applying in Magento2 Cart

I am creating simple products through API call. Product is created finely and showing all attributes finely in admin part but when ever i am seeing product in frontend it is not showing any special price. It is directly displaying price.

I am using magento 2.2.4 version. Here is the API code.

   $name = $prod_data('name');
            $price = $prod_data('price');
            $category_id = 229;
            $qty = $prod_data('qty');
                    'use_config_manage_stock' => 0,
                    'manage_stock' => 1,
                    'is_in_stock' => 1,
                    'qty' => $qty

            if ($product->save()) {
            /** add saved file to the $product gallery */
            $categoryLinkRepository = $objectManager->get('MagentoCatalogApiCategoryLinkManagementInterface');
            $categoryIds = array('229');
            $categoryLinkRepository->assignProductToCategories($sku, $categoryIds);
            $succ = 1;
            $msg = "Product created successfully";
            $logger->info("SKU Not Existed, So Creating new SKU for ". $prod_data('sku'));
                $succ = 0;
                $msg = "Unable to create product";
                 $logger->info("SKU Not Existed, But there is problem in creating sku ". $prod_data('sku'));


For updating special price i used the following code. In admin it is updating finely but final_price in index table is not changing.

if($prod_data('special_price') > 0){
                       $product2 = $objectManager->get('MagentoCatalogModelProduct')->load($pid);
                      $productResource = $objectManager->create('MagentoCatalogModelResourceModelProduct');
                      $productResource->saveAttribute($product2 , 'special_price');

I tried indexer:reindex but no use of it. Cleared cache, verified store id and everything is correct.

But still special price not showing in product detail page as well as cart page. How can i debug it.

Apply Special Price to SKUs with a Coupon Code?

We’re using Magento 2.34. We want to set up a shopping cart coupon where customers get a special price for a set of SKUs with different price levels if they enter the correct coupon code at checkout.


  • Customer receives an advertisement offering Widget 1 and Widget 2, with a coupon code listed for special pricing.
  • Widget 1 is normally $42.95. Coupon should lower the price to $14.95 per unit at checkout.
  • Widget 2 is normally $19.95. Coupon should lower the price to $4.95 per unit at checkout.

Three questions:

  • Is this possible without an extension?
  • If an extension is needed, which one is required/recommended?
  • Can this be accomplished with programming?

Thanks in advance for any help you can provide.

price – how to set order total $0 if below $1 after applying discount code or wallet?

I have removed decimal point using this extension. But after applying coupon code order total is in decimal but using this extension decimal value is not showing on frontend.

In this case, If customer using his wallet for the order so he will pay only order total which is showing. So it is creating issue for decimal value which is not showing.

How can I set order total $0(Zero) if decimal value below $1(Like: $0.2, $0.5 etc.)

magento2 – How to override product custom option price too in magneto 2

I am overriding the price using observer and it works fine until the product has custom options. I do updated the price for special price/regular price but seems like because of not handling the custom option my product are not being added to the cart. I am sharing what i have done so far:

created an observer:

<?xml version="1.0"?>
 <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
 <event name="checkout_cart_product_add_after">
        <observer name="set_custom_price_after_add_to_cart" instance="vendormoduleObserverCustomPrice" />

and related class:

namespace vendormoduleObserver;

use MagentoFrameworkEventObserverInterface;

 * Class CustomPrice
 * @package vendormoduleObserver
class CustomPrice implements ObserverInterface
    public function execute(MagentoFrameworkEventObserver $observer) {
        $item = $observer->getEvent()->getData('quote_item');
        $item = ( $item->getParentItem() ? $item->getParentItem() : $item );
        $regularprice = $item->getProduct()->getPrice();
        $price = 2*$regularprice;

Now my problem is how to handle the custom option prices??
Please help!!

sort – Sorting problem price

I have a sorting problem when I do a search the titles are also taken into account whereas I would only like to manage it by price. Thank you.

 $args  = array( 
            'post_type'           => array('product', 'product_variation'),
            'post_status'         => 'publish',
            'posts_per_page' => get_option('posts_per_page'),
            'paged'          => $paged,
            'tax_query'      => $tax_query,
            'orderby'       =>  (isset($_GET("orderby"))?$_GET("orderby"):'meta_value_num'),
            'order'         => (isset($_GET("order"))?$_GET("order"):'ASC'),

 if ($orderby == 'price') {

    $args('orderby') = 'meta_value_num';
    $args('meta_key') = '_price';
    $args('order') = 'asc';

  } elseif ($orderby == 'price-desc'){
    $args('orderby') = 'meta_value_num';
    $args('meta_key') = '_price';
    $args('order') = 'desc';   } 


 $content .='<select class="dropdown-class" name="sort-posts" id="sortbox" onchange="document.location.href=location.href+this.options(this.selectedIndex).value;"><option enabled>Trier par</option>';
 $content .='<option value="?orderby=price&order=asc">Trier par tarif croissant</option>';
 $content .='<option value="?orderby=price&order=desc">Trier par tarif décroissant</option>';
 $content .='</select>';

php – Change Sale Price to Regular Price WooCommerce

I have imported some products from CSV but made a mistake, set the Regular Price as Sale Price.

Now as the Regular Price of the products are not et, so no price is showing on the product.

So, is there a code or plugin available so that I can remove the Sale Price at once and add that value to the Regular Price area?

Looking forward to some help.

Thank you.

Selling crocoblock, astra agency and divi unlimited license with low price | Proxies-free

Hello everyone, I have these plugins with lifetime and unlimited install license and selling the license at a very low price…message me if you are interested…
1. Crocoblock(lifetime unlimited site license )
2. Astra agency( lifetime unlimited site license)
3. Divi themes(lifetime unlimited site license)
message me if you are interested…


USD/CNH Price Analysis: Looks South After Tuesday’s Inverted Hammer – Forex News & Analysis

USD/CNH formed an inverted hammer candle on Tuesday, signaling an end of the bounce from the Oct. 9 low of 6.6787.

The broader trend remains bearish, as evidenced by the trendline falling from May 27 and July 24 highs, the descending 5- and 10-week simple moving averages, and the weekly chart double top breakdown.

As such, the pair could revisit recent lows below 6.68 and may extend the drop to 6.60 in the near-term. Fundamentals also favor continued declines in the currency pair as per TopAsiaFX.

The People’s Bank of China recently said it wouldn’t employ aggressive monetary policies adopted by the western central banks. Further, according to IMF’s Chief Economist Gita Gopinath, China will be the only economy to report positive growth in 2020.

Daily Chart


Image for post

Trend: Bearish

Technical levels

  • Today last price 6.7354
  • Today daily change -0.0050
  • Today daily change % -0.07
  • Today daily open 6.7404


  • Daily SMA20 6.7683
  • Daily SMA50 6.8393
  • Daily SMA100 6.9443
  • Daily SMA200 6.9894


magento2 – Unable to update extra tier price column Magento 2.3.4

I have created a module to create an additional column in tier price by the following tutorial
While creating new products its working fine, but while updating the products it’s not working
It’s throwing error:

Fatal error: Uncaught Error: Call to a member function getAllCustomersGroup() on null in /home/arun/raisahab/www/magentoProjects/magesm/vendor/magento/module-catalog/Model/Product/Attribute/Backend/TierPrice/AbstractHandler.php:75 Stack trace: #0

Update code:

namespace ArunendraGpsalepriceModelProductAttributeBackendTierPrice;
class UpdatePriceHandler extends MagentoCatalogModelProductAttributeBackendTierPriceUpdateHandler

    public function __construct(
        MagentoStoreModelStoreManagerInterface $storeManager,
        MagentoCatalogApiProductAttributeRepositoryInterface $attributeRepository,      
        MagentoFrameworkEntityManagerMetadataPool $metadataPool,
        MagentoCatalogModelResourceModelProductAttributeBackendTierprice $tierPriceResource       
    ) {      
        $this->storeManager = $storeManager;
        $this->attributeRepository = $attributeRepository;
        $this->metadataPoll = $metadataPool;
        $this->tierPriceResource = $tierPriceResource;       
    public function execute($entity, $arguments = ())
        $attribute = $this->attributeRepository->get('tier_price');
        $priceRows = $entity->getData($attribute->getName());
        if (null !== $priceRows) {
            if (!is_array($priceRows)) {
                throw new MagentoFrameworkExceptionInputException(
                    __('Tier prices data should be array, but actually other type is received')
            $websiteId = (int)$this->storeManager->getStore($entity->getStoreId())->getWebsiteId();
            $isGlobal = $attribute->isScopeGlobal() || $websiteId === 0;
            $identifierField = $this->metadataPoll->getMetadata(MagentoCatalogApiDataProductInterface::class)->getLinkField();
            $productId = (int)$entity->getData($identifierField);

            // prepare original data to compare
            $origPrices = ();
            $originalId = $entity->getOrigData($identifierField);
            if (empty($originalId) || $entity->getData($identifierField) == $originalId) {
                $origPrices = $entity->getOrigData($attribute->getName());

            $old = $this->prepareOldTierPriceToCompare($origPrices);
            // prepare data for save
            $new = $this->prepareNewDataForSave($priceRows, $isGlobal);

            $delete = array_diff_key($old, $new);
            $insert = array_diff_key($new, $old);
            $update = array_intersect_key($new, $old);

            $isAttributeChanged = $this->deleteValues($productId, $delete);
            $isAttributeChanged |= $this->insertValues($productId, $insert);
            $isAttributeChanged |= $this->updateValues($update, $old);

            if ($isAttributeChanged) {
                $valueChangedKey = $attribute->getName() . '_changed';
                $entity->setData($valueChangedKey, 1);

        return $entity;
     * Delete tier price values for processed product
     * @param int $productId
     * @param array $valuesToDelete
     * @return bool
    private function deleteValues(int $productId, array $valuesToDelete): bool
        $isChanged = false;
        foreach ($valuesToDelete as $data) {
            $this->tierPriceResource->deletePriceData($productId, null, $data('price_id'));
            $isChanged = true;

        return $isChanged;
     * Insert new tier prices for processed product
     * @param int $productId
     * @param array $valuesToInsert
     * @return bool
    private function insertValues(int $productId, array $valuesToInsert): bool
        $isChanged = false;
        $identifierField = $this->metadataPoll->getMetadata(ProductInterface::class)->getLinkField();
        foreach ($valuesToInsert as $data) {
            $price = new MagentoFrameworkDataObject($data);
            $isChanged = true;

        return $isChanged;

     * Update existing tier prices for processed product
     * @param array $valuesToUpdate
     * @param array $oldValues
     * @return bool
    private function updateValues(array $valuesToUpdate, array $oldValues): bool
        $isChanged = false;
        foreach ($valuesToUpdate as $key => $value) {
             if ((!empty($value('value')) && (float)$oldValues($key)('price') !== (float)$value('value'))
           || $this->getPercentage($oldValues($key)) !== $this->getPercentage($value)
           || $this->getSecondaryUnit($oldValues($key)) !== $this->getSecondaryUnit($value)
        ) {
                $price = new MagentoFrameworkDataObject(
                        'value_id' => $oldValues($key)('price_id'),
                        'value' => $value('value'),
                        'percentage_value' => $this->getPercentage($value),
                        'gp_sale_price' => $this->getSecondaryUnit($value),
                $isChanged = true;

        return $isChanged;

    * @param array $priceRow
    * @return mixed|null
    public function getSecondaryUnit(array  $priceRow)
       return isset($priceRow('gp_sale_price')) && !empty($priceRow('gp_sale_price'))
           ? $priceRow('gp_sale_price')
           : null;
     * Prepare old data to compare.
     * @param array|null $origPrices
     * @return array
    private function prepareOldTierPriceToCompare(?array $origPrices): array
        $old = ();
        if (is_array($origPrices)) {
            foreach ($origPrices as $data) {
                $key = $this->getPriceKey($data);
                $old($key) = $data;

        return $old;
     * Get generated price key based on price data
     * @param array $priceData
     * @return string
    private function getPriceKey(array $priceData): string
        $qty = $this->parseQty($priceData('price_qty'));
        $key = implode(
            array_merge(($priceData('website_id'), $priceData('cust_group')), ($qty))

        return $key;
     * Prepare new data for save.
     * @param array $priceRows
     * @param bool $isGlobal
     * @return array
     * @throws MagentoFrameworkExceptionLocalizedException
    private function prepareNewDataForSave(array $priceRows, bool $isGlobal = true): array
        $new = ();
        $priceRows = array_filter($priceRows);
        foreach ($priceRows as $data) {
            if (empty($data('delete'))
                && (!empty($data('price_qty'))
                    || isset($data('cust_group'))
                    || $isGlobal === $this->isWebsiteGlobal((int)$data('website_id')))
            ) {
                $key = $this->getPriceKey($data);
                $new($key) = $this->prepareTierPrice($data);

        return $new;