Read More
Read More
Menu Close

    PrestaShop Marketplace Sample Product {User-Guide}

    With PrestaShop Marketplace Sample Product, sellers can offer samples to customers and let them try the products which in turn influences their purchase decision. The marketplace sellers can promote their products and gain new customers by providing free samples in the store. Multiple options have been provided in the module to set the sample price of a product.

    Check the overview of the plugin in the video mentioned below –

    mcWD-yrow7o

    Features of PrestaShop Marketplace Sample Product

    • Admin can limit the number of samples a customer can add in a single cart.
    • Allow/Disallow guest users to order samples of a product.
    • Automatically stock update on ordering sample product.
    • Sellers can set the price of a sample product the same as that of the product price.
    • Option to set custom price of a sample.
    • A seller can provide free samples in the store.
    • Both admin and seller can view sample product details on the “Orders” page.
    • Customers can also purchase samples of virtual products.

    NOTE:

    PrestaShop Marketplace Sample Product module is MultiShop Compatible with PrestaShop Advanced Multi-Vendor Marketplace version 6.x.x.

    Note

    1) To enable selling of sample of virtual products, add a new custom hook in /controllers/front/GetFileController.php for downloading virtual product sample:
    * Just before line:  *$mimeType = false;*

    Start your headless eCommerce
    now.
    Read More

    Add this line

    HOOK::exec('actionSampleProductDownloadBefore', array($info, &$file, &$filename));
    if (!$filename) {
        ?>
        <script type="text/javascript">
            alert("<?php echo $file ?>");
            history.back();
        </script>
        <?php
        exit();
    }

    2. If you want to enable “Minimum quantity for sale” for sample products then add a new custom hook in

    /classes/Cart.php::updateQty() for adding sample quantity less than product minimum quantity
    * Replace the code –

    if ((int)$quantity < $minimal_quantity) {
        return -1;
    }
    

    With –

    if ((int)$quantity < $minimal_quantity) {
        $sampleProductHook = Hook::exec('actionSampleProductAddInCart', array('idProduct' => $id_product));
        if (!$sampleProductHook) {
            return -1;
        }
    }
    

    3) If you are using Prestashop V1.7.5.0 or above, then make following change for adding sample less than minimal quantity:
    * Replace the code in `processChangeProductInCart()` in `/controllers/front/CartController.php` –

    if ($qty_to_check < $product->minimal_quantity) {
        $this->errors[] = $this->trans(
            'The minimum purchase order quantity for the product %product% is %quantity%.',
            array('%product%' => $product->name, '%quantity%' => $product->minimal_quantity),
            'Shop.Notifications.Error'
        );
        return;
    }
    

    With –

    if ($qty_to_check < $product->minimal_quantity) {
        $sampleProductHook = Hook::exec('actionSampleProductAddInCart', array('idProduct' => $product->id));
        if (!$sampleProductHook) {
            $this->errors[] = $this->trans(
                'The minimum purchase order quantity for the product %product% is %quantity%.',
                array('%product%' => $product->name, '%quantity%' => $product->minimal_quantity),
                'Shop.Notifications.Error'
            );
            return;
        }
    }

    Installation

    For installing this module, you need to install the PrestaShop Advanced Multi Vendor Marketplace module first.

    marketplace module installation

    After installing the marketplace module you can start the installation of the PrestaShop Marketplace Sample Product.

    Prestashop Marketplace Sample Product Installation
    Drop or select the file of MP Sample product
    MP Sample product installed on Prestashop

    Marketplace Sample Product Configuration

    After the installation of the module, the admin can configure the module settings.

    Basic Configuration

    Under “Basic Configuration” admin can:

    • Set the number of sample products a customer can add to a single cart.
    • Enable/Disable the automatic stock update of a product when its sample is ordered.
    • Allow/Disallow customers whether registered or unregistered to place an order for a sample product.
    Configuration-1

    Seller End Workflow

    After installation of the module, a new tab “Sample” gets added to the “Update Product” page. A seller can add details of a sample product under this tab.

    Seller-sample
    Offer-sample-enable-on-seller-side

    Virtual Sample Product

    The admin also can make the sample product for the virtual products.

    Virtual-Sample-product

    Virtual Sample Product at Front End

    Buy-virtual-sample-product

    After placing the order for a sample product of the virtual product, the customer can download the sample file of a virtual product from the order details page after changing the status of the order.

    Download-VSPF

    Price type

    A seller can set the price of a sample product in five different ways:

    1. Product standard price
    2. Deduct fix amount from product price
    3. Percentage of product price
    4. Custom price
    5. Free sample

    Product standard price

    A seller can set the price of a sample product the same as that of the product price.

    product-standard-price

    Front End View

    standard-product-price

    Deduct fix amount from product price

    Specify the fixed amount which will be deducted from the product price. The difference between product price and deduction amount will be the sample product price.

    Select-whether-deduction-amount-should-be-tax-included-or-tax-excluded

    Front End View

    Sample-price-after-deducting-fixed-amount

    A Percentage of product price

    Set percent of product price which will be deducted from the product price. The difference between product price and its percentage will be the sample product price.

    Specify-percent-of-product-price-to-be-deducted-from-product-price

    Front End View

    Sample-price-after-percent-amount-deduction

    Custom price

    The seller can set the custom price of the sample.

    Select-whether-custom-price-will-be-

    Front End View

    Custom-price-set-for-sample

    Free sample

    A seller can also provide a free sample of their products.

    Free-Sample-seller

    Front End View

    Free-sample-front-end

    Ordering a Sample Product

    When a seller saves sample product details, a button “Buy Sample” gets added to the product page.

    Customer-can-buy-sample-of-this-product-bt-clicking-here
    Sample-product-added-to-the-cart

    A customer cannot add a standard product and its sample in a single cart.

    warning-displayed

    Once the customer has placed an order for a sample, then he can view sample product details on the “order details” page.

    Sample-product-details

    Guest users can also place an order for the sample if enabled by the admin from the backend.

    View Sample Details in Orders

    After the customer has ordered the sample of a product, both sellers and admin can view sample details under “Orders”.

    Seller’s End

    Column-notifying-sample-of-a-product

    Admin’s End

    Order-detail-page

    Support

    For any kind of technical assistance or query, please raise a ticket at http://webkul.uvdesk.com or send us a mail at [email protected]

    Also, please explore our PrestaShop development services and a vast range of quality PrestaShop addons.

    Current Product Version - 5.1.1

    Supported Framework Version - 1.7.x.x

    . . .
    Discuss on Helpdesk

    Leave a Comment

    Your email address will not be published. Required fields are marked*


    Be the first to comment.

    Back to Top

    Table of Content