Giter VIP home page Giter VIP logo

magento2-url-key-mask's People

Contributors

werfu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

magento2-url-key-mask's Issues

Only showing attribute-id when using drop-down attribute

Title says is all: when using a drop-down attribute (brand or manufacturer in this case) the url key is only extended by the attribute id, not the Value (e.g. „434“ instead of „Nice Brand“)

Edit: I‘ve changed ProductUrlPathGenerator.php, line 74, getData() to getAttributeText() - but now it‘s only pulling the value of the drop-down attribute „brand“ and the product name is empty because it needs getData()... There needs to be some kind of switching logic, but thats way to difficult for me...

2nd Edit:
Okay, dirty as hell but working for me:

        for($i = 0; $i < count($preg_output[1]); $i++)
        {
            $value = $product->getData($preg_output[1][$i]);
            if(is_numeric($value))
            {
            	$value = $product->getAttributeText($preg_output[1][$i]);
            	if(is_null($value))
            	{
                $value = '';
                }
            }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.