A
A
Aibek Zhaksybaev2017-08-02 13:45:36
Yii
Aibek Zhaksybaev, 2017-08-02 13:45:36

How to organize a system for selling articles?

I am creating a site for the sale of articles, there is an article section, there are paid articles themselves, you need to make sure that there is a short description first and to read the article in full you need to pay money, so I’m sitting here I don’t know how to implement it all, I write in Yii2.
p.s. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
Lander, 2017-08-02
@usdglander

So add a "short_description" field to the article table and output text from it. What's the problem then? And what about Yii2?

M
Mikhail Lyalin, 2017-08-02
@mr_jok

1/ the subscription model is more convenient for buyers
2/ look at https://republic.ru/ and analogues
3/ just like "articles" from nowhere, etc. no one will buy

D
Dmitry Bay, 2017-08-02
@kawabanga

Take it in vain. The toaster is a place where they suggest thoughts and answer questions to move on.
And on the question - as you were advised.
There is a short description and there is the text of the article.
And then, depending on what functionality you want, for example:
a) if the user is logged in, then he must have his own balance and money must be withdrawn from him for the buy button.
In this option, you can do the same subscriptions. A person replenishes the account, and you manipulate him.
b) if a person does not have an account, then generate a link for him after payment, accessible, say, 5 times, then kill.
Either send it to email, or immediately after payment by the payment service.

M
Maxim Timofeev, 2017-08-03
@webinar

You can crop text. Implement the method in the model, for example:

public function getShortText($size=20){
   return yii\helpers\StringHelper::truncateHtml($this->text,$size);
}

You can finish it so that you take several sentences from different parts of the article, which in your case will be more convenient.
A separate cell in the base with shortText is simple, but in my opinion it is a redundant base. Why duplicate text, get more weight of the base, variables, etc.
But why did you take on this project? There are a million such exchanges and the main difficulty is not to do, here for 3 days of work. Difficulty to spin. It will take a lot of money and time. And the promotion of articles is gradually becoming a thing of the past, and by the time your project reaches the breakeven point, the sale of articles most likely will not be as popular as it once was and still is.
Although if you have nothing else to do - good practice.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question