Forum

Thread tagged as: Shop

shopping cart show SKU

Hi,

is here a cart tag, so I can show the SKU. as I need to check the item I select is the correct one (variant).

tony

Tony Monckton

Tony Monckton 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, absolutely.

If you add <perch:showall /> to your template you can see what's available.

Hi,

I want to display the brand name under the item title.. looking at the show all.
'brand' it setting is '1'. so it just shows 1, there is no array to brand names...

<div class="myItem_title">
     <h3><perch:cartitem id="title" /></h3>
     <perch:cartitem id="brand" />
</div>

how can I show the brand name...

tony

should there be a tag 'brand_name'

tony

Drew McLellan

Drew McLellan 2638 points
Perch Support

What does this output?

<perch:shop id="brand" type="shop_brand" />

Hi Drew,

as I'm in the cart view. I used:

<perch:cartitem id="brand" type="shop_brand" />

many thanks

tony

Drew,

I have one last issue. the SKU for the product in the cart, does not contain the variant information eg: LSM000002 should be LSM000002-size6

checkout to eBay, it uses 'LSM000002' and in perch shop/orders. it the same SKU. So no idea what size the customer has purchased.

any idea what's missing?

tony

form generated by perch:

<form id="form1_add_to_cart" action="checkout.php" method="post">
    <div class="span span1">
        <h5>Size</h5>
        <ul>
            <li>
                <label>
                    <input id="form1_options0" name="opt-3[]" type="radio" required="required" checked="checked" value="8">
                    6 (3-4 years)
                </label>
            </li>
            <li>
                <label>
                    <input id="form1_options1" name="opt-3[]" type="radio" required="required" value="9">
                    8 (4-5years)
                </label>
            </li>
            <li>
                <label>
                    <input id="form1_options2" name="opt-3[]" type="radio" required="required" value="10">
                    10 (6-7 years)
                </label>
            </li>
        </ul>
    </div>
    <div style="float:right;">
        <input id="form1_productID" name="productID" value="49" type="hidden">
        <input value="Add to cart" type="submit">
        <input type="hidden" name="cms-form" value="YWRkX3RvX2NhcnQ6cGVyY2hfc2hvcDovdGVtcGxhdGVzL3Nob3AvcHJvZHVjdHMvc2luZ2xlLmh0bWw6MTQ3MTg2MzEyMw==">
    </div>
</form>

single.html

                    <div class="col-md-5 zoom-grid">
                        <div class="flexslider">
                            <ul class="slides">
                                <li data-thumb="<perch:shop id="image" type="image" />" /> 
                                <div class="thumb-image"> <img src="<perch:shop id="image" type="image" />"  data-imagezoom="true" class="img-responsive" alt="" /> </div>
                                </li>

                                <perch:if exists="image2">
                                <li data-thumb="<perch:shop id="image2" type="image" />">
                                    <div class="thumb-image"> <img src="<perch:shop id="image2" type="image" />" data-imagezoom="true" class="img-responsive" alt="" /> </div>
                                </li>
                                </perch:if>

                                <perch:if exists="image3">
                                <li data-thumb="<perch:shop id="image3" type="image" />">
                                    <div class="thumb-image"> <img src="<perch:shop id="image3" type="image" />" data-imagezoom="true" class="img-responsive" alt="" /> </div>
                                </li>
                                </perch:if>

                                <perch:if exists="image4">
                                <li data-thumb="<perch:shop id="image4" type="image" />">
                                    <div class="thumb-image"> <img src="<perch:shop id="image4" type="image" />" data-imagezoom="true" class="img-responsive" alt="" /> </div>
                                </li>
                                </perch:if>

                                <perch:if exists="image5">
                                <li data-thumb="<perch:shop id="image5" type="image" />">
                                    <div class="thumb-image"> <img src="<perch:shop id="image5" type="image" />" data-imagezoom="true" class="img-responsive" alt="" /> </div>
                                </li>
                                </perch:if>

                                <perch:if exists="image6">
                                <li data-thumb="<perch:shop id="image6" type="image" />">
                                    <div class="thumb-image"> <img src="<perch:shop id="image6" type="image" />" data-imagezoom="true" class="img-responsive" alt="" /> </div>
                                </li>
                                </perch:if>

                                <perch:if exists="image7">
                                <li data-thumb="<perch:shop id="image7" type="image" />">
                                    <div class="thumb-image"> <img src="<perch:shop id="image7" type="image" />" data-imagezoom="true" class="img-responsive" alt="" /> </div>
                                </li>
                                </perch:if>

                                <perch:if exists="image8">
                                <li data-thumb="<perch:shop id="image8" type="image" />">
                                    <div class="thumb-image"> <img src="<perch:shop id="image8" type="image" />" data-imagezoom="true" class="img-responsive" alt="" /> </div>
                                </li>
                                </perch:if>
                            </ul>
                        </div>
                    </div>
                    <div class="col-md-7 dress-info">
                        <div class="dress-name">
                            <h3><perch:shop id="title" type="textarea" /></h3>
                            <div class="clearfix"></div>
                            <div style="padding-top:10px;">
                                <div class="single-brand">
                                    brand: <perch:shop id="brand" type="shop_brand" />
                                </div>
                                <div class="single-price">
                                    <perch:if exists="on_sale">
                                        <perch:shop id="sale_price" type="shop_currency_value" label="Price" size="m" min="0" step="any" />
                                        Sale price! Usually <perch:shop id="price" type="shop_currency_value" label="Price" size="m" min="0" step="any" />
                                    <perch:else />
                                        <perch:shop id="price" type="shop_currency_value" label="Price" size="m" min="0" step="any" />
                                    </perch:if>
                                </div>
                            </div>
                            <div class="clearfix"></div>
                            <h5>Description</h5>
                            <p><perch:shop id="description" type="textarea" /></p>
                            <h5>Specifications</h5>
                            <p><perch:shop id="specifications" type="textarea" /></p>

                            <perch:if id="catalog_only" value="0">
                                <perch:form id="add_to_cart" app="perch_shop" action="checkout.php">
                                    <perch:if exists="has_variants">
                                    <perch:productopts>
                                    <div class="span span1">
                                        <h5><perch:productopt id="title" /></h5>
                                        <perch:productvalues>
                                            <perch:before><ul></perch:before>
                                                <li>
                                                    <label>
                                                        <perch:input id="options" name="opt-<perch:productvalue id="optionID" />[]" value="<perch:productvalue id="valueID" />" type="radio" required="required" />
                                                        <perch:productvalue id="valueTitle" />
                                                    </label>
                                                </li>
                                            <perch:after></ul></perch:after>
                                        </perch:productvalues>
                                    </div>
                                    </perch:productopts>
                                </perch:if>
                                <div style="float:right;">
                                <perch:input id="productID" type="hidden" value="<perch:shop id="productID" type="hidden" env-autofill="false" />" />
                                <perch:input type="submit" value="Add to cart" />
                                </div>
                              </perch:form>
                            <perch:else />
                                <p>This item is available in-store only.</p>
                            </perch:if>
                        </div>
                        <div class="clearfix"></div>
                        <div class="purchase">
                            <div class="social-icons">
                                <ul>
                                    <li><a class="facebook1" href="#"></a></li>
                                    <li><a class="twitter1" href="#"></a></li>
                                    <li><a class="googleplus1" href="#"></a></li>
                                </ul>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="clearfix"></div>
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the variant get added to the cart or the product?

We don't have an eBay gateway option - is this something you've written yourself?

sorry paypal express.

the product has size variants setup.

single product page add product with selected variant to the cart. but the SKU doesn't not have the variant selected e.g.:6 (3-4 years)

tony

Drew McLellan

Drew McLellan 2638 points
Perch Support

If you're not seeing the variant SKU in the cart then you're not adding the variant, you're adding the parent product.

I selected the size, but it done not add variant SKU.

screen grabs;

add to cart. has size '6(3-4years)' selected https://www.tonymonckton.co.uk/addtocart.png

cart page. has parent SKU https://www.tonymonckton.co.uk/cart.png

tony

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you tried the examples from the documentation?

Fixed!

I had id="productID" should be id="product"

<perch:input id="product" type="hidden" value="<perch:shop id="productID" type="hidden" />" />

I been testing paypal express. with LSM9999-18m-PNK SKU

all seem to be ok. and in orders page its listed ok.

SKU Item desc qty price tax total LSM9999-18m-PNK White & Black bling skirt and top set 18m, pink 1 0.01 0.00 £0.01

but, the stock level for LSM9999-18m-PNK, did not change. stayed at 3!

should perch shop decrease the stock for LSM9999-18m-PNK automatically?

tony