Coder Social home page Coder Social logo

divanteltd / pimcore2vuestorefront Goto Github PK

View Code? Open in Web Editor NEW
40.0 8.0 11.0 1.23 MB

Project has been moved ->

Home Page: https://github.com/DivanteLtd/coreshop-vsbridge/

License: MIT License

JavaScript 100.00%
pimcore vuestorefront pimcore-bridge

pimcore2vuestorefront's Introduction

Project has been moved

This repository is currently not being actively developed. Please check our Core Shop Vue Storefront Bridge which is our official Vue Storefront support for Pimcore + Coreshop module.

pimcore2vuestorefront's People

Contributors

pkarw avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pimcore2vuestorefront's Issues

Add cluster/multiprocess support

We need to modify the attribute.mapToVS to work on global/shared attributes hash

Attribute values are populated by each process/product import - so if the state weren't shared it would have been easily desynchronized. Right now because we don't support multiprocess it's pretty straightforward: using a local hash.

Here is the function to be modified with some notes on the possible solutions:
\

function mapToVS (attributeCode, attributeType, attributeValue) {
    let attr = attrHash[attributeCode]
    if (! attr) {
        attr = attributeTemplate(attributeCode, attributeType)
        attr.id = maxAttrId
        attr.attribute_id = maxAttrId
        
        attrHash[attributeCode] = attr
        maxAttrId++
    } 
    if (attr.frontend_input == 'select') {
        let existingOption = attr.options.find((option) => { return option.label == attributeValue})
        if(!existingOption) {
            let lastOption = attr.options.length > 0 ? attr.options[attr.options.length-1] : null // we can use memored or elastic search to store each option per each attribute separately - to keep the same indexes between processes for example key would be: $attribute_code$$attribute_value = 14 
                                                                                                  // OR SEND MODIFIED attributes to the workers each time attrHash changes: https://nodejs.org/api/cluster.html#cluster_cluster_workers
            let optIndex = 1
            if (lastOption) {
                optIndex = lastOption.value + 1
            }
            attr.options.push({
                label: attributeValue,
                value: optIndex
            })
            return optIndex
        } else {
            return existingOption.value // non select attrs
        }


    } else {
        return attributeValue
        // we're fine here for decimal and varchar attributes
    }
}

Magento images are not displaying in Vue-StoreFront

Hello,

I successfully connected Magento to Vue-StoreFront. I'm able to get all products in Vue-StoreFront which are added in Magento. But I'm unable to get Magento product images in Vue-StoreFront.

How I will get my Magento product images in Vue-StoreFront??

When I was installing Vue-StoreFront it was asked for image path , which path we need to provide there?either Magento image path or Vue-StoreFront path??
I have imagemagic also, still it is not working.
Anyone please help me.

Thanks in advance :),
Anirudh.

Move the assets downloading process out of the products synchro

If we did this then we must have changed the product.image set logic - moving it to another process:

                images.value.map((imgDescr) => {
                    let imgId = imgDescr.value[0].value
                    imagePromises.push(new Promise((imgResolve, imgReject) => {
                        this.api.get(`asset/id/${imgId}`).end((resp) => {
                            if(resp.body && resp.body.data) {
                                const imageName =  resp.body.data.filename
                                const imageRelativePath = resp.body.data.path
                                const imageAbsolutePath = path.join(this.config.pimcore.assetsPath, imageRelativePath, imageName)
                                
                                shell.mkdir('-p', path.join(this.config.pimcore.assetsPath, imageRelativePath))
                                fs.writeFileSync(imageAbsolutePath, Buffer.from(resp.body.data.data, 'base64'))
                                console.debug(`File ${imageName} stored to ${imageAbsolutePath}`)
                                convertedObject.image = path.join(imageRelativePath, imageName)
                                imgResolve()
                            }
                        })
                    }))
                })

Incremental product update

Is their a way to tigger a single product update from Pimcore to ES? Or do i need to run this indexer every 15 mins?

Missing indexMetadata.json file in var folder

I am a beginner in this project. I tried manually dump products using the node index.js new command in the /src folder, but I'm having trouble finding the file. /var/indexMetadata.json I want to know where this file can be found? And why do not I have the /var folder already?

Thanks in advance

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.