Prestashop - VAT Number for guests and new accounts - prestashop

I am using Prestashop 1.6
I would to know if there is a way to make the VAT Number field appear in the "Guest check out" and "New account" forms, but without being required (because some countries doesn't have VAT Number).
I tried to remove "VAT Number" from some countries in the Localization tab in the dashboard, but it didn't change anything, so the solution is not there.
Thank you !

I think I found the solution.
In your_shop/themes/default-bootstrap/order-opc-new-account.tpl
Remove the following line :
{elseif $field_name eq "vat_number"}

Related

Add custom text box with dynamic text on every product page

I want to add a couple of lines of dynamic text to my product description.
Like this text
What is the price of "product name" in Singapore?
The latest price of "product name" in Singapore is "product price" You can buy the "product name" at best price from our "store name" or visit "store address"
I don't want to visit every product page to add this.
And I want google to capture the question (attached picture)
https://ibb.co/3YJ8dmk
https://ibb.co/wS73jpr
How can I do it?
You should develop a simple module which uses one of the Prestashop product display hooks to show your dynamic informations.
A good starting point in module development is here
You can use one of theses hook to add your product custom fields (See the doc)
displayAdminProductsExtra
displayAdminProductsMainStepLeftColumnMiddle
displayAdminProductsMainStepLeftColumnBottom
displayAdminProductsMainStepRightColumnBottom
displayAdminProductsQuantitiesStepBottom
displayAdminProductsPriceStepBottom
displayAdminProductsOptionsStepTop
displayAdminProductsOptionsStepBottom
displayAdminProductsSeoStepBottom
See module demo to add custom fields https://github.com/PululuK/democustomfields17

Prestashop 1.7.6.9 display default category_name into email and backoffice order

I need to show:
"default category name" of the purchased products into email template
order_conf "default category name" of the purchased products into
backoffice > single order (where at the moment it shows product_name + reference)
BO > orders > order > purchased product
Would you give me some indication on the files to be modified to show the category name (default_category) of the purchased products?
I have searched around the web but I can't find any solution / instructions to do this
Thanks to anyone who will be able to help me
Prestashop 1.7.6.9
To show info in back office order detail you can use hook displayAdminOrderLeft.
For more info look at https://devdocs.prestashop.com/1.7/modules/concepts/hooks/list-of-hooks/
For mail you must change order_conf.html in mails directory.
To put extra data in template vars you can use actionEmailAddBeforeContent hook.
Thankyou Fran Cerezo for the indication to investigate.
To show Default Category name into hook "displayAdminOrderLeft", i opened
/admin123456/themes/default/template/controllers/orders/_product_line.tpl file
So i added
{if isset($product.id_category_default)}
{assign var='catname' value=Category::getCategoryInformations(array($product.id_category_default))}
{$catname[$product.id_category_default].name}
{/if}
Otherwise, to show the "default category name" in the order confirmation email (for single product purchased) I'm in trouble ..
The /mails/it/order_conf.html file declares the {products} variable.
Where do I find the template to edit the {products} variable and then add the category name information?
Where is the reference file located?
Thanks
{products variable into order_conf.html}

Does Prestashop auto manages the product quantity when products are purchased?

Sorry for asking this here, on Prestashop forum I dont get any replays. And sorry for my english.
In order to explain my problem I will make a simple example:
product "X product" in stock are 10 items. (quantity = 10)
when some one adds one item to card and purchase it, i think it is logically that quantity will become 9.
on my website it remains 10. Why?
Or at list the quantity must change when order become FINISHED/ APPROVED...
Who can give me some tips how I must configure my prestashop in order to achive the wanted result?
Your shop may be in the mode digital product management.
Here is a possible answer. Go to your backend > Preferences > Products.
Scroll down to the end of the page. In the group of configuration 'Product stocks', make sure that you have activate the option 'Activate stock management'. It may solve your issue.
I hope it helps.

How to fix price error for a product in Magento?

I am trying to fix this product listing: http://shop.crystalvine.com/salt/blueberrysalt-c.html
You see in the dropdown there is an option for "refill" which is supposed to say $10.95 but says $45.95
When I log into Magento and click on Catalog --> Manage Products
There are f different listings for this product, differentiated by size/price. I try to edit the price by clicking "edit" on the product and under the price option on the left I edit the price and save.
But doing that to the products does not change the price on the live site when I edit the price for them.
Am I doing something wrong there? How do I change the price?
Thanks!!
This is a configurable product.
Make sure you change the price for the simple product having that option or in the configurable product page, choose "Associated products" and make the price change there.
Then you probably must reindex your catalog (System -> Index managment).

eBay API: ReviseItemRequest and removing Item.ShippingDetails.ShippingServiceOptions

Due to this
For enable Local Pickup Only shipping we don't require insert "ShippingDetails" container into request.
It's work ok for ListItem, but have some problem on ReviseItem
For example:
1) We List item with specified Shipping. For example:
<ShippingDetails>
<ShippingServiceOptions>
<ShippingService>UPSGround</ShippingService>
<ShippingServiceCost>0</ShippingServiceCost>
<ShippingServicePriority>1</ShippingServicePriority>
</ShippingServiceOptions>
<ShippingType>Flat</ShippingType>
</ShippingDetails>
2) After that we try to Revise item, remove all shipping information and activate "Local Pickup Only"
First variant:
Don't specify ShippingDetails, send only ShipToLocations only
<ShipToLocations>None</ShipToLocations>
eBay return errors like:
"At least one valid shipping service must be specified"
Second variant:
Specify empty ShippingDetails or ShippingDetails with some shipping method (I use 'LocalDelivery'). And still no luck.
Are there any solution to activate "Local Pickup Only" shipping after item was listed with some Domestic & International shippings methods.
I would appreciate for any help.
Thank you.
This is an eBay API specific question, I recommend you to ask this question on eBay developer community, they are awesome, you will get a reply very quickly!