product "in stock"

  • Posts: 12
  • Thank you received: 0
  • Hikashop Business
2 years 5 months ago #336508

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.2
-- PHP version -- : 7.2.34
-- Browser(s) name and version -- : CHROME 95.0.4638.54

Hello. On my store site, I make my products by pre-order, but in the search (google) under the product description it says "in stock". This can be confusing to potential customers.
Where does Google get it - "in stock"? Can I change something so that it says for example "Available for order"?


example

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
2 years 5 months ago #336513

Hi,

It gets it from the line:

<meta itemprop="availability" content="https://schema.org/<?php echo ($this->row->product_quantity != 0) ? 'InStock' : 'OutOfstock' ;?>" />
in the file product / show_default.php that you can edit via the menu Display>Views.
There, you can change InStock to PreOrder if you want Google to display PreOrder instead of InStock for all your products.
More information about the possible values available here: schema.org/ItemAvailability

Last edit: 2 years 5 months ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
  • Hikaserial Standard
1 year 6 months ago #344677

Hi Nicolás,
Before you read it, I think I can do it with massaction and adding user permission according to status in the payment methods. However, if there is a less cumbersome solution ....
I have enabled the "obsidev_productpreorder" plugin.
In our case, hikashop is used to sell courses and we want this system to be activated as a waiting list when a course runs out of places.
Through the warehouse function that we call Waiting List, we change the corresponding payment method so that the payment is not made at first, and the order is reflected in the system. We use payment on delivery called Waiting List restricted to Waiting List warehouse. The order remains in "Waiting List" status
When we verify that there are places, we go to an admitted state so that they can make the payment, but obviously only the payment mentioned above "Waiting list" comes out.
If I add the usual payment methods "servired" to a warehouse called "Waiting list", when adding to the waiting list it gives them both options, waiting list payment that is on delivery and the usual servired payment.
There would be some way that when these two payment methods are activated in the warehouse Waiting list, it does not show servired if the status is Waiting list.

Last edit: 1 year 6 months ago by dvddvd.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
1 year 6 months ago #344699

Hi,

A simple solution would be to create a view override of order / pay.php via the menu Display>Views and unset the payment method before the dropdown is generated.
For example something like that:

<?php unset($this->paymentPluginType->methods['payment'][(string)@$this->order->order_id][0]); ?>
where 0 is the position of the payment method in the dropdown (0 for the first one, 1 for the second one, etc)

Another solution, if you have only one payment method (other than the waiting list one), would be to use a mass action to change the payment method of the order in the backend (or via a mass action when the status of the order is changed) and turn off the "Allow customers to change their payment method after checkout" setting of the HikaShop configuration so that the user cannot change his payment method on the frontend. That way, no override is required.

The following user(s) said Thank You: dvddvd

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
  • Hikaserial Standard
1 year 6 months ago #344703

Thanks Nicolas, I understand you, that would eliminate if I'm not mistaken the option in the payment link. Could the same be done on the check out screen ...task-show/cid-2
Could it be done instead of by position by type of payment plugin?

Last edit: 1 year 6 months ago by dvddvd. Reason: privacy

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
1 year 6 months ago #344728

Hi,

Yes, in the show_block_payment view file, you can use such code:

<?php unset($cart->usable_methods->payment[0]); ?>
where 0 is the position of the payment method (0 for the first one, 1 for the second one, etc)

Last edit: 1 year 6 months ago by nicolas.
The following user(s) said Thank You: dvddvd

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
  • Hikaserial Standard
1 year 6 months ago #344739

Hello Nicolas
I can't do it, what would be the correct position of the code that you indicate me, so that it takes effect

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
1 year 6 months ago #344742

Hi,


You could put it for example before the line :

<legend><?php echo JText::_('HIKASHOP_PAYMENT_METHOD');?></legend>

The following user(s) said Thank You: dvddvd

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
  • Hikaserial Standard
1 year 6 months ago #344751

Thanks Nicolas,
what a fool I am. I hadn't realized I put the question mark. (<?php unset($cart->usable_methods->payment[0]); ?>)
That's why it didn't work for me.
Thank you very much as always.

Please Log in or Create an account to join the conversation.

  • Posts: 81361
  • Thank you received: 13037
  • MODERATOR
1 year 6 months ago #344753

Sorry for the typo in the original code.

The following user(s) said Thank You: dvddvd

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
  • Hikaserial Standard
1 year 6 months ago #344819

Hello, by incorporating the obsidev_productpreorder plugin, the product listing administration view has become a bit complicated to interpret.

In the product quantity now it seems that it adds the quantity of the real stock with the limit established in preorder.

It would be of great help to us in this view to be able to visualize the following data related to the products.

1 .- That the real number of existing products reappear in the product quantity, without adding preorder
2.- View the number of products that are in listadeespera status
3.- View the number of products that are in confirmed status
4.- View the remaining amount that is still free in preorder

Thanks Nicolas, I know it's a bit complicated, but it would be very helpful.

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
  • Hikaserial Standard
1 year 6 months ago #345002

Hello,
Can you think of a way to make these changes? Thank you very much!!

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
1 year 6 months ago #345005

Hello,

Can you provide more details regarding what you want to have ?
Nicolas noticed me that something which could be done in the "pre order product" plugin but I need to fully understand your need to write some specifications.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 267
  • Thank you received: 5
  • Hikaserial Standard
1 year 6 months ago #345021

Thank you Jerome for your attention.

When installing your plugin, which is very useful for us, we see that the modified stock appears in the product management list, adding the actual stock of each product together with the quantity assigned in the preorder complement, without making any distinction as to how much is really in stock and what are the products that are in preorder.

1.- In our case what we offer are courses, therefore we will be interested in obtaining this differentiation. We would like to know the real stock that exists in each course and the number or stock of courses that are preorders.

2.- In our case we use your plugin so that students can be put on the waiting list for a course whose places have been sold out. Before, to enroll on the waiting list for a course, we did it in person at the office, putting the student who requested it on the waiting list. Now students can do it both online and in person.

We have configured hikashop in the following way, when a course reaches stock 0 a massaction changes the product warehouse to "waiting list", to modify the payment methods and let the student add the course to waiting list status without making the pay.

This is currently not possible because if we configure your plugin, as the stock adds the free places with the preorders, which we have configured to 30, it is not zero when the course sells all the real places available, in our case this value would be 30 instead of zero and the massaction that changes the product warehouse would not act properly.

When it is verified that there are free places, because other students have unenrolled or the number of places in the course has been increased due to sufficient demand, we change the students who are in the waiting list status to the admitted status, in this way they receive the status change email with the payment method already enabled so that they can make the purchase.

Therefore, there are students on the waiting list, either because they have registered themselves online through the web, or because they have been assigned that status from the office when they attend in person.

Due to the above, it would be very useful for us to be able to see the real number of places that exist in each course in the product list view of the administration, although in many cases it is zero, and the number of students in that course in the waitlist. .

3.- Finally, it would also be very important for us to differentiate between the number of real stock and the number of preorders, since in the case of adding real stock to a course, because there are free places after having processed the students in the waitlist. We would like to enable another massaction to change the warehouse again to put the product back in its normal mode without a waiting list.

In summary, it would be very useful for us in the product list view to be able to visualize

a.- a column with the true stock of each product, including if it is in zero stock
b.- a column with the number of students/clients who are enrolled in that course. State confirmed.
c.- a column with the number of students/clients who are on the waiting list for that course. waitlist status.

Thank you very much again for your attention.

Please Log in or Create an account to join the conversation.

  • Posts: 25994
  • Thank you received: 4004
  • MODERATOR
1 year 6 months ago #345083

Hello,

Nicolas noticed me that something which could be done in the "pre order product" plugin but I need to fully understand your need to write some specifications.

Thank you for the long description but an important part of your message is very specific to your website and internal management.
Like explained in my previous message, an improvement can be done in the "pre order product" plugin.
That kind of modification is not a custom development, it's just a plugin improvement via a "feature request".
That feature request must be useful for every users of the plugin (so not a custom development).
For point A, I can see ; for points B and C, right now it looks like custom dev.

If you can provide me specifications for that plugin, I'll be happy to analyse it and develop it for a future release.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum