Magento 2 View-able product - magento

I am looking if Magento can offer me a product type that's can be viewed not downloaded, for example I have a video and I want the user to pay first then he can watch it? is this possible product type in Magento?
Thank you,

Not out of the box.
You can make it as a normal product that a user ads to bag and after the customer buys it at checkout you redirect to the page with the video.
Or on success page you will provide them with a link to the video, which is otherwise unreachable. Additionally you can put a check in that page and ask the customer to insert the order number to view it.

Related

Create magento product that links to an external website

I want to add a product that is not held on my magento website. It must only show on my website. But when a customer clicks on a product it directly goes to the website that holds the product.
I want to give the URL to the product on the site. I am not sure how to do this. Please help me. Thanks.
Here are some screen shots that show what I actually want to do:
product show on my website
Customer goes to other website
The way i would suggest you is to create an attribute called external_url, a textinput field. Assign it to required attribute sets then, while adding product if that particular product will be linked to external; input that field with external url.
And while populating product in listings, check if that external_url attribute value exists or not. (for eg on template/catalog/product/list.phtml check for this value $_product->getData('external_url'))
If the value exists then, change the product link(on product list.phtml change $_product->getProductUrl() with our $_product->getData('external_url'))

identify cash on delivery is availble or not using zip/postal code check on product view page in magento

I want to add a textfield on "Product- view - page"
so that by entering zip/postal code, customer can check whether "cash on delivery " option is available in their address or not.
I have some 500 zip/pin codes that support cash on delivery.
I think you requirement is fulfilled using the get a quote block in your product-detail page.
Here is what you need to do:
Create a tablerate shipping method named Cash On Delivery and upload your csv with price.
Use the Get a Quote block that is in cart page in default, and place it in product detail page. This can be done from layout i guess.
Now after you get the Get a Quote in your product detail page.Show only zip code field and hide other field.
This could solve your problem,if i got it right.
Hope this will help.

How to get product related information from customer when he add a product to cart?

i want to attach a form to a product and when customer want to add that product to cart he should fill in the info in this form 1st.
And that information must be attached with the purchased details.
for example
i want to get size information (like length, neck, waiste, sleaves, chest etc) from the customer when he wishes to purchase a product. and then this information must be sent with the purchased details (or may be in email etc)
How to approach towards this solution.
Right now i am using custom options for it. but this is not a good solution cuz i believe there must be better approach than that
Add a custom form module, there are free form extension in magento connect.
And then add the form into the view.phtml, add your script to enable the "add-cart" button only after submitted the form.
Is this the flow you expected?

magento show "Sign up to get notified when this product is back in stock" link for simple-associated products

How can we display the "Sign up to get notified when this product is back in stock" link for associated products of a configurable product.
Say, we have a T-Shirt (a configurable product) and we sell it in 3 sizes - Medium, Large and Xtra-Large (simple - associated products).
When the Large size goes out of stock, how can we make user subscribe for it for notification when it is back in stock.
Please note I have already set this setting in admin:
System > Configuration > Catalog > Allow Alert When Product Comes Back in Stock - Yes
I noticed that the url for this alert is like (it is for one of the simple products in my store):
http://localhost/mystore/index.php/productalert/add/stock/product_id/1/[some key]/[some key],,/
Is there any way we can call this url directly, passing the product id of our associated product in question? If so, what about those keys at the end of the url?
please guide.
thanks
I added this link beside the out-of-stock associated product:
http://localhost/mysite/index.php/productalert/add/stock/product_id/[associated_product_id]/uenc/[any_key]/
For e.g.
http://localhost/mysite/index.php/productalert/add/stock/product_id/17/uenc/MTM0MzcyMDk0Mw==/
It does my job.
Only thing is, after successfully adding the alert record, it redirects to home page, instead of same page as in normal case.
This is due to [any_key], if we could somehow encrypt current page url [the any_key] just like magento does, we can have it redirect to same page also, after successful saving of alert record.
Any ideas?
Thanks
Ok I got it finally!
The uenc key [any_key] is actually base64 encoding of current url.
So with the help of https://github.com/carlo/jquery-base64, I did:
var encodedUrl = $.base64.encode(window.location);
var redirectTo = 'http://localhost/mysite/index.php/productalert/add/stock/product_id/[associated_product_id]/uenc/' + encodedUrl + '/';
Hope this helps!
The Magento way to get the url would be:
Mage::helper('productalert')->setProduct($_product)->getSaveUrl('stock')
Magento already avails the functionality to set out of stock from admin panel, unfortunately it is limited to some instances therefore we can not set this from admin panel, either way you can do it in code as above mentioned but its a manual task and can not be done again and again with links.
So i think its better to use ready made extension in case you have specific requirement to set product stock alert functionality for customer and they can subscribe for it.
Here is the well managed extension for Magento 2 which can help you to set Product alert and sign-up / subscription functionality with many more admin manageable features.
Link to Out of stock notification extension for Magento 2 - https://www.mconnectmedia.com/out-of-stock-alert-magento2.html

Magento admin section

Hai
In my magneto project, admin side invoices, I want to display the product name, sku and
manufactures, is it possible???
I know that when clicking View Link I can show, but I want to show the details in the table in the invoices page
Probably the best place to start is:
/app/design/adminhtml/default/default/tempalte/sales/order/invoice/view/
Everything within the /app/design/adminhtml/ is where you'll want to go to edit any available templates for the backend.
Remember that Magento is full of magic methods. So, often times if you want to output a particular attribute, simply call something like: echo $_item->getManufacturer();
Hope that helps.

Resources