How to fix price error for a product in Magento? - indexing

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).

Related

Prestashop add custom radio button on shipping carriers on front end checkout

I have created one custom module in Prestashop 1.7.8.7 which will add multiple shipping methods (Carrier) and will show shipping cost based on product dimensions and delivery address. So shipping carrier will look something like this on front-end checkout page. https://prnt.sc/E1avDASyJYYW
Now if someone select SameDay Courier Shipping then i need to show two radio button to select which service they want.
It will have two radio options like
Delivery pickup (by default this option will be selected)
Locker pickup
So if someone select Delivery pickup then it will have different shipping cost and if someone select Locker pickup then it will have different shipping cost.
Can anybody help me how can i achieve this functionality.
While digging, i found that we have file called DeliveryOptionsFinder.php and in that file we have one public function called getDeliveryOptions() where we have this line of code
if ($moduleId = Module::getModuleIdByName($carrier['external_module_name'])) {
$carrier['extraContent'] = Hook::exec('displayCarrierExtraContent', ['carrier' => $carrier], $moduleId);
}
}
So if i set is_module to 1 to all my carriers directly from DB then on frontend checkout page, no carriers is being displayed.
Thanks in advance.
I've already done something like this in the last 2 year as prestashop developer.
The truth is that you can't achieve what you want by "respecting" prestashop processes.
Maybe you can hook using a module the hookDisplayCarrierExtraContent($data) and then return the 2 radios if carrier is certain one (use $data).
But you can't handle a form submit or something else, or include it to prestashop checkout data.
But what you can do as workaround, for example, is the following.
In your module, as I said, hook the extra content, render a template with the 2 radios. Hook displayHeader too and use $this->context->controller->addJS() to add your own js if the current controller is the checkout one.
Then in this JS code you can handle the "change" event of the radios and send an ajax request to your module.
You can create inside {your_module}/controllers/front/ a controller called, for example, radio-choose and handle the js ajax request by saving inside your own table the choosen one.
Obviously you can disable the "next" button in checkout untill one of the two radios are selected, or maybe you can just set a radio button as default one to simplify.
For example your table "ps_cart_choosen_radio" could look like this |id_cart|choosen_radio|.
Then you have all the data you needed. When a cart is converted into an order you will have inside Order object (and ps_orders table as well) the id_cart.
Just select / join choosen radio from your own table by using order's id_cart.
"SELECT choosen_radio FROM ps_cart_choosen_radio WHERE id_cart = {$order.id_cart}"
If you need to show data depending on choosen_radio in frontend you can hook everywhere an order is present and select these data. Or maybe you can edit carrier name in ps_orders table by adding a piece of string. Let' say carrier is "express" and customer choosed "24h". You can update that column with carrier name by changing it to "express-24h" so around the whole prestashop ecosystem everybody will see that's a 24h choice.
Remember that the carrier name related to an order is not the carrier name inside the carriers table. So you can edit it without having trouble.
All these problems comes from the "need" to show some nested choices instead of listing all these in the main selections. In that case it would be easy (just create carrier in the prestashop backoffice)

Products with no options are having the product quantity input hidden

I have a Big Commerce store that has several products. Most of the products have options such as size and color which are working fine. A few products have no options and on those products the product-quantity input is being hidden after the page loads.
If I go into Advanced Options > Inventory > General Settings and set "When an option is out of stock" to "Hide the option" the product quantity becomes visible again and the product can be added to cart. I don't think this is a good solution because then products with options that are actually out of stock will still be available.
Any help that you can provide me would be much appreciated.
Thank you
Try to check if you have the following option in your Config.JSON file.
"show_product_quantity_box": true/false
If you do, just set it to true. If this is not the case, did you try to manually display the quantity box/input with SCSS ?

Showing different price on category page and single product page in variable product in bigcommerce

Showing different price on category page and single product page in variable product in bigcommerce. I just want to show the lowest price on category page.
This is the category page: https://hilineelectronics.com/portable-audio/. In the first product price is showing $112.99 and after checking it quick view and single product page it is showing $83.99. I want $83.99 (varibale amount) amount there.
How can we do this? Any variable or code for this?
Thanks in advance.
Go to your CategoryProductsItem.html check the code
<em class="p-price">%%GLOBAL_ProductPrice%%</em>
Is there %%GLOBAL_ProductPrice%% call same or different with product details page.
ProductDetails.html
<span class="ProductPrice VariationProductPrice">%%GLOBAL_ProductPrice%%</span>
Compare both files global varriable.
The second way makes the backup and of the files and then revert it to the original.

Prestashop: Producto with price 0 in category page

I have a prestashop 1.6 web.
I have this product, with a price of 19€. The product page is showing the correct price.
http://batavia.es/es/escuadra-y-cartabon-2395.html
But the price is 0 in the category page:
http://batavia.es/es/unisex-116158?p=2
I have this problem only with this product. I have checked the product in admin panel, and it seems correct. The product have not discounts or specific prices. I have debugged the php object, and it has the price attribute to 0.
Anything that I can try?
Thanks.
The product price can be fetched using the getPriceStatic() function in Product.php class file, you can try debugging this function for the product which is causing the issue.
You might be able to find the problem with that product.

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.