Announcement

Collapse
No announcement yet.

Variant SKU not available on ORDP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Variant SKU not available on ORDP

    Client has a wholesale site and we are using the SKU field to store the UPC code. All our products are parents with color variants. So the actual product ordered is the color variant.

    I'm using the following toolkit code to be able to print out the SKU field on all pages: BASK, OCST, OPAY, INVC

    Code:
    <mvt:item name="toolkit" param="vassign|variantcode|" />
    <mvt:if expr="l.settings:item:variant_id GT 0">
        <mvt:item name="toolkit" param="variantlistbasketinfo|vcount|l.all_settings:item:product_id|l.all_settings:item:variant_id" />
        <mvt:if expr="vcount GT 0">
            <mvt:foreach iterator="part" array="basketitem:variant:parts">
                <mvt:item name="toolkit" param="vassign|productcode|l.all_settings:part:code" />
                <mvt:item name="toolkit" param="vassign|productsku|l.all_settings:part:sku" />
            </mvt:foreach>
        </mvt:if>
    <mvt:else>
        <mvt:item name="toolkit" param="vassign|productcode|l.all_settings:item:code" />
        <mvt:item name="toolkit" param="vassign|productsku|l.all_settings:item:product:sku" />
    </mvt:if>                    
    
    
    <br />SKU: &mvt:part:sku;
    Where I'm stumped is the Printable Invoice template page: ORDP

    No matter what, the info isn't showing for the SKU field. In looking at the variables, it seems things are slightly different on the ORDP page than the other pages.

    Any ideas on why this code doesn't work on ORDP?

    -Kevin
    Web Design and Development, Internet Marketing
    Lancer Media, Inc.

    #2
    Re: Variant SKU not available on ORDP

    Hey Kevin -

    Did you try using &mvt:item:parts[1]:sku;

    The variant sku should be available there:

    http://extranet.miva.com/forums/show...code-on-orders

    For the code above, make sure your not using the new order:groups array on that page. It looks like that function is only available using the order:items array.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Variant SKU not available on ORDP

      Brennan,

      Thanks...I did try that but wasn't seeing anything. I'm going to paste the entire code of that page, with my toolkit code in it so you can see below:

      I have to look further tomorrow with some test orders because this afternoon, even with variables being printed to the page, I wasn't seeing any SKUs listed.

      -Kevin




      Code:
      <table class="basket">
      	<thead>
      		<tr id="basket-header-row">
      			<td class="align-left"><strong>Product</strong></td>
      			<td class="align-left"><strong>Status</strong></td>
      			<td><strong>Quantity</strong></td>
      			<td class="align-right"><strong>Price</strong></td>
      			<td class="align-right"><strong>Subtotal</strong></td>
      		</tr>
      	</thead>
      	<tbody>
      		<mvt:foreach iterator="item" array="order:items">
      			<tr class="basket-prod-row">
      				<td class="prod">
      					<p>
      						<strong>&mvt:item:code; - </strong>&mvt:item:name;
      						<mvt:if expr="l.settings:item:upsold">
      							&nbsp;(Special Offer)
      						</mvt:if>
      					</p>
      					<mvt:foreach iterator="option" array="item:options">
      						<mvt:if expr="l.settings:option:option_id">
      							&mvt:option:attr_prompt;: &mvt:option:opt_prompt;
      						<mvt:elseif expr="NOT ISNULL l.settings:option:data">
      							&mvt:option:attr_prompt;: &mvt:option:data;
      						<mvt:elseif expr="NOT ISNULL l.settings:option:data_long">
      							&mvt:option:attr_prompt;: &mvt:option:data_long;
      						<mvt:else>
      							&mvt:option:attr_prompt;
      						</mvt:if>
      
      
      						<mvt:item name="toolkit" param="vassign|variantcode|" />
      						<mvt:if expr="l.settings:item:variant_id GT 0">
      							<mvt:item name="toolkit" param="variantlistbasketinfo|vcount|l.all_settings:item:product_id|l.all_settings:item:variant_id" />
      							<mvt:if expr="vcount GT 0">
      								<mvt:foreach iterator="part" array="basketitem:variant:parts">
      									<mvt:item name="toolkit" param="vassign|productcode|l.all_settings:part:code" />
      									<mvt:item name="toolkit" param="vassign|productsku|l.all_settings:part:sku" />
      								</mvt:foreach>
      							</mvt:if>
      						<mvt:else>
      							<mvt:item name="toolkit" param="vassign|productcode|l.all_settings:item:code" />
      							<mvt:item name="toolkit" param="vassign|productsku|l.all_settings:item:product:sku" />
      						</mvt:if>					
      
      
      						<br />SKU: &mvt:part:sku;
      					</mvt:foreach>
      				</td>
      				<td>&mvt:item:order_status;</td>
      				<td class="align-center">&mvt:item:quantity;</td>
      				<td class="align-right">
      					<p>
      						<mvt:if expr="l.settings:item:price EQ '0' OR l.settings:item:price EQ '0.00' OR l.settings:item:price EQ 0.00 OR l.settings:item:price EQ 0">
      							&nbsp;
      						<mvt:else>
      							&mvt:item:formatted_price;
      						</mvt:if>
      					</p>
      					<mvt:foreach iterator="option" array="item:options">
      						<mvt:if expr="l.settings:option:price">
      							<p>&mvt:option:formatted_price;</p>
      						</mvt:if>
      					</mvt:foreach>
      				</td>
      				<td class="align-right">
      					<p>
      						<mvt:if expr="l.settings:item:price EQ '0' OR l.settings:item:price EQ '0.00' OR l.settings:item:price EQ 0.00 OR l.settings:item:price EQ 0">
      							&nbsp;
      						<mvt:else>
      							&mvt:item:formatted_subtotal;
      						</mvt:if>
      					</p>
      					<mvt:foreach iterator="option" array="item:options">
      						<mvt:if expr="l.settings:option:price">
      							<p>&mvt:option:formatted_subtotal;</p>
      						</mvt:if>
      					</mvt:foreach>
      				</td>
      			</tr>
      		</mvt:foreach>
      	</tbody>
      </table>
      <div id="totals" class="clearfix">
      	<div>
      		<mvt:foreach iterator="charge" array="order:charges">
      			<p class="charges"><em>&mvt:charge:descrip;:</em> &mvt:charge:formatted_disp_amt;</p>
      		</mvt:foreach>
      		<p class="total"><strong>Total:</strong> &mvt:order:formatted_total;</p>
      	</div>
      </div>
      Web Design and Development, Internet Marketing
      Lancer Media, Inc.

      Comment


        #4
        Re: Variant SKU not available on ORDP

        Just an update to anyone who also has this issue.....seems the upgrade of the store to v9 solved it. The original code that worked on all pages BUT the ORDP page, now works on the ORDP page.

        -Kevin
        Web Design and Development, Internet Marketing
        Lancer Media, Inc.

        Comment

        Working...
        X