• Resolved chemistrap

    (@chemistrap1)


    Hello again
    Thank you for great plugin.
    I’m using contentedly.
    But..
    I’ve problem a xml for shoe’s store.
    All shoes has variable sizes and sizes has different stock numbers.
    I watched that video https://www.youtube.com/watch?v=F1NX4po0dsc&feature=youtu.be
    and read about many document but i could not figured out about stock and their tutorials not included about stocks.

    I could provide an example :
    <Stocks>
    <Stock>
    <Feature name=”Size”>40</Feature>
    <Stockcount>1</Stockcount>
    <StockCode/>
    <StockPrice/>
    </Stock>
    <Stock>
    <Feature name=”Size”>39</Feature>
    <Stockcount>2</Stockcount>
    <StockCode/>
    <StockPrice/>
    </Stock>
    </Stocks>

    As you can see that example there is different shoe’s size and stock number but i could not figured out how can set up ?

    And also there is another problem for discounted price.
    In XML there is no sale price just has sale discount (eg: 15%, without percentage sign) but i could not put it sale price too.
    Could you please help me?

    Thank you so much

Viewing 1 replies (of 1 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hi @chemistrap1

    As you can see that example there is different shoe’s size and stock number but i could not figured out how can set up ?

    We would need to see the full example file to understand how the variations are being created and advise on how to import the stock values to them. Please replicate your import at https://www.wpallimport.com/debug/ and open a ticket at https://www.wpallimport.com/support/ with details on the issue.

    In XML there is no sale price just has sale discount (eg: 15%, without percentage sign) but i could not put it sale price too.

    You can use a custom PHP function in the import for this: https://www.wpallimport.com/documentation/developers/execute-php/. For example, you could pass the price element and the discount element to your function:

    [my_get_final_price({price[1]},{discount[1]})]

    Then, save your code in the Function Editor, e.g.:

    function my_get_final_price( $price, $discount = '' ) {
     if ( empty( $discount ) ) {
    	 return null;
     } else {
    	 $discount = "." . $discount;
    	 return $price - ( $price * $discount );
     }
    }

    Keep in mind that this is just an example and you may need to adjust it.

Viewing 1 replies (of 1 total)
  • The topic ‘Variable Products with Xpath Stock Problem’ is closed to new replies.